[Orxonox-commit 436] r2154 - in media: gui/scripts levels

danielh at orxonox.net danielh at orxonox.net
Sat May 23 09:50:54 CEST 2009


Author: danielh
Date: 2009-05-23 09:50:54 +0200 (Sat, 23 May 2009)
New Revision: 2154

Modified:
   media/gui/scripts/PickupInventory.lua
   media/levels/pickuptest.oxw
Log:
Some changes on pickups

Modified: media/gui/scripts/PickupInventory.lua
===================================================================
--- media/gui/scripts/PickupInventory.lua	2009-05-23 01:44:34 UTC (rev 2153)
+++ media/gui/scripts/PickupInventory.lua	2009-05-23 07:50:54 UTC (rev 2154)
@@ -2,18 +2,12 @@
 
 -- variables
 local winMgr = CEGUI.WindowManager:getSingleton()
+
 local lastEquipmentCount_ = 0
 local lastUsableCount_ = 0
+local currentUsableID_ = 0
 
-local currentUsableID_ = -1
-local lastUsedEquipID_ = 0
-local lastUsedUsableID_ = 0
-
 -- events
-function tabChanged(e)
-    local we = CEGUI.toWindowEventArgs(e)
-    orxonox.PickupInventory:tabChanged(we.window)
-end
 function frmUpdate(e)
     local equipCount = orxonox.PickupInventory:getEquipmentCount()
     local usableCount = orxonox.PickupInventory:getUsableCount()
@@ -47,8 +41,8 @@
 function updateTabs()
     local eqWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabEquipment")
     local usWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabUsable")
-    orxonox.PickupInventory:clearInventory(winMgr, lastEquipmentCount_, lastUsableCount_)
-    orxonox.PickupInventory:updateTabs(winMgr, eqWin, usWin)
+    orxonox.PickupInventory:getSingleton():clearInventory(winMgr, eqWin, usWin)
+    orxonox.PickupInventory:getSingleton():updateTabs(winMgr, eqWin, usWin)
     
     currentUsableID_ = orxonox.PickupInventory:getCurrentUsableIndex()
     lastEquipmentCount_ = orxonox.PickupInventory:getEquipmentCount()

Modified: media/levels/pickuptest.oxw
===================================================================
--- media/levels/pickuptest.oxw	2009-05-23 01:44:34 UTC (rev 2153)
+++ media/levels/pickuptest.oxw	2009-05-23 07:50:54 UTC (rev 2154)
@@ -16,6 +16,12 @@
     <Template name="jumpTest" baseclass="Jump">
         <Jump velocity="0,0,500" jumpsAvailable="1" guiImage="decal.jpg" guiText="TEST" />
     </Template>
+    <Template name="jumpTest2" baseclass="Jump">
+        <Jump velocity="0,0,-500" jumpsAvailable="1" guiImage="dish.jpg" guiText="J2" />
+    </Template>
+    <Template name="jumpTest3" baseclass="Jump">
+        <Jump velocity="0,0,-500" jumpsAvailable="1" guiImage="sl_organic03.jpg" guiText="J3" />
+    </Template>
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
 
     <PickupSpawner item="jumpTest" triggerDistance="20" respawnTime="2" position="100, 0, 0">
@@ -24,6 +30,18 @@
             <Billboard material="Examples/Flare" colour="0.5, 1.0, 0.3" scale="0.5" />
         </attached>
     </PickupSpawner>
+    <PickupSpawner item="jumpTest2" triggerDistance="20" respawnTime="5" position="140, 140, 140">
+        <attached>
+            <Model mesh="sphere.mesh" scale="3.0" />
+            <Billboard material="Examples/Flare" colour="1.0, 0.5, 0.3" scale="0.5" />
+        </attached>
+    </PickupSpawner>
+    <PickupSpawner item="jumpTest3" triggerDistance="20" respawnTime="5" position="180, 180, 180">
+        <attached>
+            <Model mesh="sphere.mesh" scale="3.0" />
+            <Billboard material="Examples/Flare" colour="0.5, 0.3, 1.0" scale="0.5" />
+        </attached>
+    </PickupSpawner>
 
     <SpawnPoint position="200,200,200" lookat="100,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
 




More information about the Orxonox-commit mailing list