Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 18, 2012, 3:39:47 PM (13 years ago)
Author:
smerkli
Message:

merged branch shipSelection

Location:
code/branches/presentation2012
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012

  • code/branches/presentation2012/data/gui/scripts/SingleplayerMenu.lua

    r9050 r9208  
    22
    33local P = createMenuSheet("SingleplayerMenu")
    4 
     4P.loadAlong = {"ShipSelectionMenu"}
    55P.levelList = {}
    66P.activeTabIndexes = {}
    77P.scrollbarWidth = 13
     8selectedlevel = {} -- level for ship selection
    89
    910function P.onLoad()
     
    4647    while index < size do
    4748        level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
    48         if level ~= nil then
     49        if (level ~= nil and level:getXMLFilename() ~= "_temp.oxw") then
     50            --os.execute("echo " .. level:getXMLFilename() .." >> ~/outputorx")
    4951            local levelXMLFilename = level:getXMLFilename()
    5052            -- create an imageset for each screenshot
     
    141143
    142144function P.SingleplayerStartButton_clicked(e)
    143     local level = P.SingleplayerGetSelectedLevel()
    144     if level ~= nil then
    145         orxonox.execute("startGame " .. level:getXMLFilename())
    146         hideAllMenuSheets()
     145    selectedlevel = P.SingleplayerGetSelectedLevel()
     146    if selectedlevel ~= nil then
     147        if selectedlevel:hasTag("shipselection") then
     148            local shipSelectionMenu = showMenuSheet("ShipSelectionMenu", true)
     149            shipSelectionMenu:update()
     150        else
     151            orxonox.execute("startGame " .. selectedlevel:getXMLFilename())
     152            hideAllMenuSheets()
     153        end
    147154    end
    148155end
  • code/branches/presentation2012/data/levels/tutorial.oxw

    r9016 r9208  
    22 name = "Coding Tutorial"
    33 description = "Level for the coding tutorial."
    4  tags = "tutorial"
     4 tags = "tutorial, shipselection"
    55 screenshot = "codingtutorial.png"
     6 startingships = "spaceshipassff, spaceshipghost, spaceshipspacecruiser"
    67/>
    78
     
    1011  include("stats.oxo")
    1112  include("templates/spaceshipAssff.oxt")
     13  include("templates/spaceshipGhost.oxt")
     14  include("templates/spaceshipSpacecruiser.oxt")
    1215  include("templates/lodInformation.oxt")
    1316?>
     
    2326   skybox       = "Orxonox/skypanoramagen1"
    2427  >
    25 
    26 
    27 
    28 
    2928<Drone name="meineDrohne" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">
    3029  <attached>
     
    5352      for i = 1, 10, 1 do
    5453    ?>
    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 />
     54      <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 />
    5655    <?lua end ?>
    5756
Note: See TracChangeset for help on using the changeset viewer.