Test
This commit is contained in:
parent
dd69385669
commit
8614cc43e6
4
main.lua
4
main.lua
@ -78,7 +78,7 @@ function love.load()
|
||||
table.insert(unspawnedNotes, newNote)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for i = 0, 3 do
|
||||
local receptor = myTypes.Sprite("sprites/NOTE_assets.png", "sprites/NOTE_assets.json", false)
|
||||
receptor:PlayAnimation("arrow"..directions[i+1], 25, false)
|
||||
@ -230,7 +230,7 @@ function love.update(dt)
|
||||
myTypes.cameraTarget = myTypes.Vector2(-stage.camera_boyfriend[1], -stage.camera_boyfriend[2]):Add(characters.bf.stageCamera:Negate())
|
||||
else
|
||||
-- When i add DAD he will be here too
|
||||
myTypes.cameraTarget = myTypes.Vector2(-stage.camera_opponent[1], -stage.camera_opponent[2]):Add(characters.dad.stageCamera:Negate())
|
||||
myTypes.cameraTarget = myTypes.Vector2(stage.camera_opponent[1], stage.camera_opponent[2]):Add(characters.dad.stageCamera:Negate())
|
||||
end
|
||||
|
||||
if not inst:isPlaying() then
|
||||
|
@ -45,7 +45,7 @@ function module.Sprite(image, sheet)
|
||||
end
|
||||
|
||||
local atlas = json.parse(sheetString).TextureAtlas.SubTexture
|
||||
|
||||
|
||||
local animations = {}
|
||||
|
||||
local quads = {}
|
||||
@ -126,7 +126,7 @@ function module.updateSprites(dt)
|
||||
|
||||
if sprite.elapsed > 1 / sprite.fps then
|
||||
sprite.frame = sprite.quads[sprite.animation][sprite.frame + 1] and sprite.frame + 1 or sprite.looping and 1 or sprite.frame
|
||||
|
||||
|
||||
if not sprite.quads[sprite.animation][sprite.frame + 1] and not sprite.looping then
|
||||
sprite.ended = true
|
||||
end
|
||||
@ -147,6 +147,7 @@ function module.updateSprites(dt)
|
||||
end
|
||||
|
||||
function module.drawSprites()
|
||||
print(module.cameraPosition)
|
||||
for index, sprite in next, Sprites do
|
||||
if not sprite.animation or not sprite.quads or not sprite.quads[sprite.animation] then goto continue end -- For some reason OG LUA doesnt have continue
|
||||
-- So im forced to use goto ::continue:: since it goes straight to the last point of the cycle
|
||||
@ -185,7 +186,7 @@ function module.Rect(image, sheet)
|
||||
end
|
||||
|
||||
local atlas = json.parse(sheetString).TextureAtlas.SubTexture
|
||||
|
||||
|
||||
local animations = {}
|
||||
|
||||
local quads = {}
|
||||
@ -243,4 +244,4 @@ module.note = noteclass.note
|
||||
characterclass.myTypes = module
|
||||
module.character = characterclass.character
|
||||
|
||||
return module
|
||||
return module
|
||||
|
@ -9,7 +9,7 @@
|
||||
"hide_girlfriend": false,
|
||||
|
||||
"camera_boyfriend": [0, 0],
|
||||
"camera_opponent": [0, 0],
|
||||
"camera_opponent": [500, 0],
|
||||
"camera_girlfriend": [0, 0],
|
||||
"camera_speed": 1
|
||||
}
|
||||
|
Reference in New Issue
Block a user