Changeset 4574 for data/trunk/scripts
- Timestamp:
- Jan 28, 2007, 1:22:43 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/trunk/scripts/cutscene/cutscene.lua
r4570 r4574 9 9 triggerOne:setScript("cutscene.lua") 10 10 triggerOne:setFunction("switchCamTargetToEarth") 11 triggerOne:setAbsCoor(0 , 0 , -50)11 triggerOne:setAbsCoor(0 , 0 , 0) 12 12 triggerOne:setTarget("CameraOne") 13 13 triggerOne:setRadius(10) … … 37 37 thisscript:addObject("CameraMan", "cameraManager") 38 38 thisscript:addObject("NPC", "shutleOne") 39 thisscript:addObject("NPC", "fighterOne") 40 thisscript:addObject("NPC", "fighterTwo") 41 thisscript:addObject("NPC", "bomberOne") 42 thisscript:addObject("NPC", "bomberTwo") 39 43 thisscript:addObjectAsName("GameWorld", "Cut Scene", "gameWorld") 40 44 … … 46 50 bInit = 0 47 51 bInit2 = 0 52 fighterSpeed = 10 53 bomberSpeed = 10 54 55 -- Since the spaceships go along the x direction we only neet to get these once: 56 fighterOneY = fighterOne:getAbsCoorY() 57 fighterOneZ = fighterOne:getAbsCoorZ() 58 59 fighterTwoY = fighterTwo:getAbsCoorY() 60 fighterTwoZ = fighterTwo:getAbsCoorZ() 61 62 bomberOneY = bomberOne:getAbsCoorY() 63 bomberOneZ = bomberOne:getAbsCoorZ() 64 65 bomberTwoY = bomberTwo:getAbsCoorY() 66 bomberTwoZ = bomberTwo:getAbsCoorZ() 48 67 49 68 … … 53 72 54 73 function shutle:tick(timestep) 74 55 75 if cameraManager:getCurrCameraCoorZ() > 0 then 56 76 coorX = shutleOne:getAbsCoorX() 57 77 coorY = shutleOne:getAbsCoorY() 58 78 coorZ = shutleOne:getAbsCoorZ() 59 shutleOne:setAbsCoor(coorX- .06,coorY,coorZ)79 shutleOne:setAbsCoor(coorX-6.5*timestep,coorY,coorZ) 60 80 end 81 end 82 83 --} 84 85 86 -- chaseScene 87 chaseScene = { } 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 61 104 end 62 105 … … 91 134 92 135 shutle:tick(timestep) 136 chaseScene:tick(timestep) 93 137 94 138 if bInit == 0 then … … 105 149 if not cameraSwitched then 106 150 cameraManager:setCam("CameraOne") 107 --cameraManager:atachCurrCameraToWorldEntity("NPC", " shutleOne")108 cameraManager:changeCurrTarget(" Planet", "Moon")151 --cameraManager:atachCurrCameraToWorldEntity("NPC", "fighterOne") 152 cameraManager:changeCurrTarget("Building", "zhara") 109 153 cameraSwitched = true 110 154 end
Note: See TracChangeset
for help on using the changeset viewer.