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

Revision 1009, 1.9 KB checked in by dave, 10 years ago (diff)

fixed character names, click-through plants working, misc fixes

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
21interface Sprite
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 Hidden:Bool;
29    public var Centre:Vec2;
30
31        public function MouseDown(c:Dynamic, f:Dynamic -> Void=null) : Void;
32        public function MouseUp(c:Dynamic, f:Dynamic -> Void=null) : Void;
33        public function MouseOver(c:Dynamic, f:Dynamic -> Void=null) : Void;   
34        public function MouseOut(c:Dynamic, f:Dynamic -> Void=null) : Void;
35    public function EnableMouse(s:Bool): Void;
36    public function ChangeBitmap(t:TextureDesc) : Void;
37
38    public function SetPos(s:Vec2) : Void;
39        public function SetScale(s:Vec2) : Void;
40        public function SetRotate(angle:Float) : Void; 
41    public function SetDepth(s:Int) : Void;
42    public function GetDepth(): Int;
43    public function CentreMiddleBottom(s:Bool) : Void;
44    public function Hide(s:Bool) : Void;
45
46        public function Update(frame:Int, tx:Dynamic) : Void;
47
48    public function GetTx() : Dynamic;
49    public function LoadFromURL(url:String) : Void;
50}
51
Note: See TracBrowser for help on using the repository browser.