Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 17, 2012, 7:19:14 PM (13 years ago)
Author:
huttemat
Message:

test

Location:
code/branches/shipSelection/data
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/shipSelection/data/gui/scripts/ShipSelectionMenu.lua

    r9045 r9046  
    22
    33local P = createMenuSheet("ShipSelectionMenu")
    4 P.levelList = {}
     4level = nil
    55P.activeTabIndexes = {}
    66P.scrollbarWidth = 13
    7 
     7function P.loadShips(levelname)
     8    --orxonox.execute("echo " .. levelname)
     9    --level = levelname
     10end
    811function P.onLoad()
    912--[[    P.createLevelList()
     
    140143--]]
    141144function P.ShipSelectionStartButton_clicked(e)
    142 --[[
    143     local level = P.ShipSelectionGetSelectedLevel()
    144     if level ~= nil then
    145145
    146         if level:hasTag("shipselection") then
    147             orxout("working!")
    148             showMenuSheet("ShipSelectionMenu", true)
    149         else
    150             orxonox.execute("startGame " .. level:getXMLFilename())
    151             hideAllMenuSheets()
    152         end
     146    if P.level ~= nil then
     147        orxonox.execute("startGame " .. level:getXMLFilename())
     148        hideAllMenuSheets()
     149    else
     150        orxonox.execute("keyESC")
    153151    end
    154 --]]
    155152end
    156153
     
    166163
    167164function P.ShipSelectionBackButton_clicked(e)
    168     --hideMenuSheet(P.name)
     165    orxonox.execute("keyESC")
    169166end
    170167
  • code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua

    r9045 r9046  
    145145
    146146        if level:hasTag("shipselection") then
    147             showMenuSheet("ShipSelectionMenu", true)
     147            local shipSelectionMenu = showMenuSheet("ShipSelectionMenu", true)
     148            shipSelectionMenu:loadShips(level:getXMLFilename())
    148149        else
    149150            orxonox.execute("startGame " .. level:getXMLFilename())
  • code/branches/shipSelection/data/levels/tutorial.oxw

    r9039 r9046  
    5353      for i = 1, 10, 1 do
    5454    ?>
    55       <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
     55      <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=shipselection />
    5656    <?lua end ?>
    5757
Note: See TracChangeset for help on using the changeset viewer.