Commits

Philémon Gardet committed c4e7a56

Premiere salle terminee.

Comments (0)

Files changed (11)

 								ignore (self#doFunction ("active_"^sObject) 
 									~args:[LString (self#getCurrentItem)] u)
 							in
-							push (self#walkToPos player (x,y)) priorityFunc;
+							self#walkToPos player (x,y) ();
+							push (function u -> 
+								let act () = "active" in
+								(displayData#get player).updating#setAnimation (act u)
+								) priorityFunc;
 							push (action) priorityFunc;
 							push (function () -> currentItem <- None) priorityFunc
 						end
 				let rec browser = 
 					let parseType = function
 						| LInt v -> string_of_int v
-						| LString v -> "\""^v^"\n"
+						| LString v -> "\""^v^"\""
 					in function
 					| [] -> ""
 					| a::[] -> parseType a

superGame/characters/guy/animation.xml

 		<frame time="1"/>
 		<frame time="1"/>
 	</animation>
+	<animation id="active" loop="false" file="active.png" w="124" h="161" direction="8" key="49" ox="62" oy="151">
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+		<frame time="1"/>
+	</animation>
 </animations>

superGame/game.xml

 	<scriptDir href="scripts/"/>
 	<fontDir href="fonts/"/>
 	
-	<firstRoom name="lightRoom" node="begin"/>
+	<firstRoom name="begin" node="begin"/>
 	<player name="guy"/>
 </game>

superGame/items/hammer/animation.xml

-<animations>
-	<animation id="idle" loop="false" file="idle.png" h="56" w="56" direction="1" key="1">
-		<frame time="1"/>
-	</animation>
-</animations>

superGame/items/hammer/animation/idle.png

Removed
Old image

superGame/items/hammer/info.xml

-<Item name="hammer" thumbnail="thumbnail.png">
-	<Position x="100" y="100"/>
-</Item>

superGame/items/hammer/script.lua

Empty file removed.

superGame/items/hammer/thumbnail.png

Removed
Old image

superGame/rooms/begin/script.lua

 function main ()
-	sayHello()
+	place_item("interupteur",160,515)
 	return 
 end
+
+function active_interupteur ()
+	sayHello()
+	set_global_int ("pistonUp",1)
+	return
+end

superGame/rooms/lightRoom/script.lua

-function main ()
+function active_interupteur ()
 	sayHello()
+	return
+end
+
+function main ()
+	place_item("interupteur",160,515)
 	return 
 end
 							browser node min z
 						| h :: z -> browser h (self#getDistance (self#getCoor h) (x,y)) z 
 					in browser a d t
-			in if (self#getDistance (self#getCoor nearestNode) (x,y)) > 100. then ""
+			in if (self#getDistance (self#getCoor nearestNode) (x,y)) > 180. then ""
 			else nearestNode
 		
 		(** Get Nodes Info **)