124 lines
5.3 KiB
Lua
124 lines
5.3 KiB
Lua
local myTypes = require("modules.types")
|
|
local rollingBGTank
|
|
local bgTankX = 300
|
|
local bgTankY = 300
|
|
local bgTankRotate = 0
|
|
local watchtower, audience1, audience2, audience3, audience4, audience5, audience6
|
|
|
|
return {
|
|
onCreate = function(song)
|
|
local tankSky = myTypes.Image("images/tank/tankSky.png")
|
|
tankSky.layer = -10
|
|
tankSky.position = myTypes.Vector2(-400, -400)
|
|
tankSky.modifer = 0
|
|
|
|
local tankMountains = myTypes.Image("images/tank/tankMountains.png")
|
|
tankMountains.layer = -9
|
|
tankMountains.position = myTypes.Vector2(-280, -20)
|
|
tankMountains.modifier = 0.2
|
|
tankMountains.resize = myTypes.Vector2(1.2, 1.2)
|
|
|
|
local tankBuildings = myTypes.Image("images/tank/tankBuildings.png")
|
|
tankBuildings.position = myTypes.Vector2(-180, 0)
|
|
tankBuildings.modifier = 0.3
|
|
tankBuildings.layer = -7
|
|
tankBuildings.resize = myTypes.Vector2(1.1, 1.1)
|
|
|
|
local tankRuins = myTypes.Image("images/tank/tankRuins.png")
|
|
tankRuins.position = myTypes.Vector2(-180, 0)
|
|
tankRuins.modifier = 0.35
|
|
tankRuins.layer = -6
|
|
tankRuins.resize = myTypes.Vector2(1.1, 1.1)
|
|
|
|
local clouds = myTypes.Image("images/tank/tankClouds.png")
|
|
clouds.position = myTypes.Vector2(0, 0)
|
|
clouds.modifier = 0.4
|
|
clouds.layer = -8
|
|
|
|
local smokeLeft = myTypes.Sprite("sprites/tank/smokeLeft.png", "sprites/tank/smokeLeft.json")
|
|
smokeLeft:PlayAnimation("SmokeBlurLeft instance 1", 24, true)
|
|
smokeLeft.position = myTypes.Vector2(-200, 0)
|
|
smokeLeft.modifier = 0.4
|
|
smokeLeft.layer = -5
|
|
|
|
local smokeRight = myTypes.Sprite("sprites/tank/smokeRight.png", "sprites/tank/smokeRight.json")
|
|
smokeRight:PlayAnimation("SmokeRight instance 1", 24, true)
|
|
smokeRight.position = myTypes.Vector2(1100, -100)
|
|
smokeRight.modifier = 0.4
|
|
smokeRight.layer = -5
|
|
|
|
watchtower = myTypes.Sprite("sprites/tank/tankWatchtower.png", "sprites/tank/tankWatchtower.json")
|
|
watchtower:PlayAnimation("watchtower gradient color instance 1", 24, false)
|
|
watchtower.position = myTypes.Vector2(25, 50)
|
|
watchtower.modifier = 0.5
|
|
watchtower.resize = myTypes.Vector2(2, 2)
|
|
watchtower.layer = -4
|
|
|
|
rollingBGTank = myTypes.Sprite("sprites/tank/tankRolling.png", "sprites/tank/tankRolling.json")
|
|
rollingBGTank:PlayAnimation("BG tank w lighting instance 1", 24, true)
|
|
rollingBGTank.position = myTypes.Vector2(bgTankX, bgTankY)
|
|
rollingBGTank.modifier = 0.5
|
|
rollingBGTank.layer = -3
|
|
rollingBGTank.rotation = bgTankRotate
|
|
|
|
local tankGround = myTypes.Image("images/tank/tankGround.png")
|
|
tankGround.position = myTypes.Vector2(-420, -150)
|
|
tankGround.layer = -2
|
|
tankGround.resize = myTypes.Vector2(1.15, 1.15)
|
|
|
|
audience1 = myTypes.Sprite("sprites/tank/tank0.png", "sprites/tank/tank0.json")
|
|
audience1:PlayAnimation("fg tankhead far right instance 1", 24, false)
|
|
audience1.position = myTypes.Vector2(-500, 650)
|
|
audience1.modifier = 1.5
|
|
audience1.layer = 2
|
|
|
|
audience2 = myTypes.Sprite("sprites/tank/tank2.png", "sprites/tank/tank2.json")
|
|
audience2:PlayAnimation("foreground man 3 instance 1", 24, false)
|
|
audience2.position = myTypes.Vector2(360, 980)
|
|
audience2.modifier = 1.5
|
|
audience2.layer = 3
|
|
|
|
audience3 = myTypes.Sprite("sprites/tank/tank3.png", "sprites/tank/tank3.json")
|
|
audience3:PlayAnimation("fg tankhead 4 instance 1", 24, false)
|
|
audience3.position = myTypes.Vector2(1050, 1240)
|
|
audience3.modifier = 2.5
|
|
audience3.layer = 5
|
|
|
|
audience4 = myTypes.Sprite("sprites/tank/tank4.png", "sprites/tank/tank4.json")
|
|
audience4:PlayAnimation("fg tankman bobbin 3 instance 1", 24, false)
|
|
audience4.position = myTypes.Vector2(1200, 900)
|
|
audience4.modifier = 1.5
|
|
audience4.layer = 4
|
|
|
|
audience5 = myTypes.Sprite("sprites/tank/tank5.png", "sprites/tank/tank5.json")
|
|
audience5:PlayAnimation("fg tankhead far right instance 1", 24, false)
|
|
audience5.position = myTypes.Vector2(1550, 700)
|
|
audience5.modifier = 1.5
|
|
audience5.layer = 3
|
|
|
|
audience6 = myTypes.Sprite("sprites/tank/tank1.png", "sprites/tank/tank1.json")
|
|
audience6:PlayAnimation("fg tankhead 5 instance 1", 24, false)
|
|
audience6.position = myTypes.Vector2(-300, 750)
|
|
audience6.modifier = 1.5
|
|
audience6.layer = 2
|
|
end,
|
|
|
|
onBeat = function(beat)
|
|
if beat % 2 == 0 then
|
|
watchtower:PlayAnimation("watchtower gradient color instance 1", 24, false)
|
|
audience1:PlayAnimation("fg tankhead far right instance 1", 24, false)
|
|
audience2:PlayAnimation("foreground man 3 instance 1", 24, false)
|
|
audience3:PlayAnimation("fg tankhead 4 instance 1", 24, false)
|
|
audience4:PlayAnimation("fg tankman bobbin 3 instance 1", 24, false)
|
|
audience5:PlayAnimation("fg tankhead far right instance 1", 24, false)
|
|
audience6:PlayAnimation("fg tankhead 5 instance 1", 24, false)
|
|
end
|
|
end,
|
|
|
|
--zero fucking idea what im doing
|
|
onUpdate = function(dt)
|
|
bgTankX = math.sin(math.rad(0.1)) * 50
|
|
bgTankY = math.cos(math.rad(0.1)) * 50
|
|
bgTankRotate = bgTankRotate + 1
|
|
end
|
|
} |