Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4574 for data/trunk/scripts


Ignore:
Timestamp:
Jan 28, 2007, 1:22:43 PM (18 years ago)
Author:
snellen
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/trunk/scripts/cutscene/cutscene.lua

    r4570 r4574  
    99triggerOne:setScript("cutscene.lua")
    1010triggerOne:setFunction("switchCamTargetToEarth")
    11 triggerOne:setAbsCoor(0 , 0 , -50)
     11triggerOne:setAbsCoor(0 , 0 , 0)
    1212triggerOne:setTarget("CameraOne")
    1313triggerOne:setRadius(10)
     
    3737thisscript:addObject("CameraMan", "cameraManager")
    3838thisscript:addObject("NPC", "shutleOne")
     39thisscript:addObject("NPC", "fighterOne")
     40thisscript:addObject("NPC", "fighterTwo")
     41thisscript:addObject("NPC", "bomberOne")
     42thisscript:addObject("NPC", "bomberTwo")
    3943thisscript:addObjectAsName("GameWorld", "Cut Scene", "gameWorld")
    4044
     
    4650bInit = 0
    4751bInit2 = 0
     52fighterSpeed = 10
     53bomberSpeed = 10
     54
     55-- Since the spaceships go along the x direction we only neet to get these once:
     56fighterOneY = fighterOne:getAbsCoorY()
     57fighterOneZ = fighterOne:getAbsCoorZ()
     58
     59fighterTwoY = fighterTwo:getAbsCoorY()
     60fighterTwoZ = fighterTwo:getAbsCoorZ()
     61 
     62bomberOneY = bomberOne:getAbsCoorY()
     63bomberOneZ = bomberOne:getAbsCoorZ()
     64
     65bomberTwoY = bomberTwo:getAbsCoorY()
     66bomberTwoZ = bomberTwo:getAbsCoorZ()
    4867
    4968
     
    5372
    5473 function shutle:tick(timestep)
     74
    5575 if cameraManager:getCurrCameraCoorZ() > 0 then
    5676  coorX = shutleOne:getAbsCoorX()
    5777  coorY = shutleOne:getAbsCoorY()
    5878  coorZ = shutleOne:getAbsCoorZ()
    59   shutleOne:setAbsCoor(coorX-.06,coorY,coorZ)
     79  shutleOne:setAbsCoor(coorX-6.5*timestep,coorY,coorZ)
    6080 end
     81 end
     82
     83 --}
     84
     85
     86-- chaseScene
     87chaseScene = { }
     88--{
     89
     90 function chaseScene:tick(timestep)
     91
     92
     93  fighterOneX = fighterOne:getAbsCoorX()
     94  fighterTwoX = fighterTwo:getAbsCoorX()
     95  bomberOneX  = bomberOne:getAbsCoorX()
     96  bomberTwoX  = bomberTwo:getAbsCoorX()
     97 
     98  fighterOne:setAbsCoor(fighterOneX + fighterSpeed*timestep,fighterOneY,fighterOneZ)
     99  fighterTwo:setAbsCoor(fighterTwoX + fighterSpeed*timestep,fighterTwoY,fighterTwoZ)
     100  bomberOne:setAbsCoor(bomberOneX + bomberSpeed*timestep,bomberOneY,bomberOneZ)
     101  bomberTwo:setAbsCoor(bomberTwoX + bomberSpeed*timestep,bomberTwoY,bomberTwoZ)
     102 
     103 
    61104 end
    62105
     
    91134
    92135shutle:tick(timestep)
     136chaseScene:tick(timestep)
    93137
    94138if bInit == 0 then
     
    105149if not cameraSwitched then
    106150cameraManager:setCam("CameraOne")
    107 --cameraManager:atachCurrCameraToWorldEntity("NPC", "shutleOne")
    108 cameraManager:changeCurrTarget("Planet", "Moon")
     151--cameraManager:atachCurrCameraToWorldEntity("NPC", "fighterOne")
     152cameraManager:changeCurrTarget("Building", "zhara")
    109153cameraSwitched = true
    110154end
Note: See TracChangeset for help on using the changeset viewer.