source: scenarios/GerminationX/fungi/src/truffle/interfaces/Sprite.hx @ 1706

Revision 1651, 2.2 KB checked in by dave, 9 years ago (diff)

HTML5 renderer

Line 
1// t r u f f l e Copyright (C) 2010 FoAM vzw   \_\ __     /\
2//                                          /\    /_/    / / 
3// This program is free software: you can redistribute it and/or modify
4// it under the terms of the GNU Affero General Public License as
5// published by the Free Software Foundation, either version 3 of the
6// License, or (at your option) any later version.
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11// GNU Affero General Public License for more details.
12//
13// You should have received a copy of the GNU Affero General Public License
14// along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
16package truffle.interfaces;
17
18import truffle.Vec2;
19import truffle.interfaces.TextureDesc;
20
21class Sprite extends Drawable
22{
23    public var Pos:Vec2;
24    public var Width:Int;
25    public var Height:Int;
26    public var Angle:Float;
27    public var MyScale:Vec2;
28    public var Centre:Vec2;
29    var DoCentreMiddleBottom:Bool;
30
31    public function new() { super(); }
32
33        public function MouseDown(c:Dynamic, f:Dynamic -> Void=null) : Void {}
34        public function MouseUp(c:Dynamic, f:Dynamic -> Void=null) : Void {}
35        public function MouseOver(c:Dynamic, f:Dynamic -> Void=null) : Void {} 
36        public function MouseOut(c:Dynamic, f:Dynamic -> Void=null) : Void {}
37    public function EnableMouse(s:Bool): Void {}
38    public function ChangeBitmap(t:TextureDesc) : Void {}
39
40    public function SetPos(s:Vec2) { Pos=s; DrawMe=true; }
41        public function SetScale(s:Vec2) { MyScale=s; DrawMe=true; }
42        public function SetRotate(angle:Float) { Angle=angle; DrawMe=true; }
43    public function GetTx() : Dynamic { return null; }
44    public function TransformedPos() : Vec2 { return null; }
45
46    public function SetColour(c:Vec3) {}
47    public function GetColour() { return null; }
48    public function SetOffsetColour(c:Vec3) {}
49    public function GetOffsetColour() { return null; }
50
51    public function CentreMiddleBottom(s:Bool) : Void
52    {
53        DoCentreMiddleBottom=s;
54    }
55
56    public function Hide(s:Bool) : Void;
57
58        public function Update(frame:Int, tx:Dynamic) : Void {}
59
60    public function LoadFromURL(url:String) : Void {}
61}
62
Note: See TracBrowser for help on using the repository browser.