From ff957be7d38a3143aa89a798184a975af00998bc Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 20 Jan 2017 14:24:50 +0100 Subject: Animated platform test for Abyss small --- maps/alpha abyss.lua | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'maps') diff --git a/maps/alpha abyss.lua b/maps/alpha abyss.lua index a3b6153..2df6adc 100644 --- a/maps/alpha abyss.lua +++ b/maps/alpha abyss.lua @@ -1,4 +1,20 @@ -- The abyss of the alpha. +local animations_small = { + default = { + [1] = love.graphics.newQuad(0, 0, 60,20, 600,20), + [2] = love.graphics.newQuad(60, 0, 60,20, 600,20), + [3] = love.graphics.newQuad(120, 0, 60,20, 600,20), + [4] = love.graphics.newQuad(180, 0, 60,20, 600,20), + [5] = love.graphics.newQuad(240, 0, 60,20, 600,20), + [6] = love.graphics.newQuad(300, 0, 60,20, 600,20), + [7] = love.graphics.newQuad(360, 0, 60,20, 600,20), + [8] = love.graphics.newQuad(420, 0, 60,20, 600,20), + [9] = love.graphics.newQuad(480, 0, 60,20, 600,20), + [10] = love.graphics.newQuad(540, 0, 60,20, 600,20), + frames = 10, + repeated = true + } +} return { -- GENERAL name = "alpha abyss", @@ -30,19 +46,22 @@ return { x = -145, y = -50, shape = {0,0, 59,0, 59,19, 0,19}, - sprite = "assets/platforms/alpha-small-1.png" + sprite = "assets/platforms/alpha-small.png", + animations = animations_small }, { x = 85, y = -50, shape = {0,0, 59,0, 59,19, 0,19}, - sprite = "assets/platforms/alpha-small-1.png" + sprite = "assets/platforms/alpha-small.png", + animations = animations_small }, { x = -30, y = -80, shape = {0,0, 59,0, 59,19, 0,19}, - sprite = "assets/platforms/alpha-small-1.png" + sprite = "assets/platforms/alpha-small.png", + animations = animations_small } }, decorations = {} -- cgit v1.1 From f44ce392bc511fdfd24c54a5ee24b09f8ff6836f Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 20 Jan 2017 16:07:30 +0100 Subject: Big platform added and generating animation table --- maps/alpha abyss.lua | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'maps') diff --git a/maps/alpha abyss.lua b/maps/alpha abyss.lua index 2df6adc..0dd2c61 100644 --- a/maps/alpha abyss.lua +++ b/maps/alpha abyss.lua @@ -1,20 +1,26 @@ -- The abyss of the alpha. +-- Animations local animations_small = { default = { - [1] = love.graphics.newQuad(0, 0, 60,20, 600,20), - [2] = love.graphics.newQuad(60, 0, 60,20, 600,20), - [3] = love.graphics.newQuad(120, 0, 60,20, 600,20), - [4] = love.graphics.newQuad(180, 0, 60,20, 600,20), - [5] = love.graphics.newQuad(240, 0, 60,20, 600,20), - [6] = love.graphics.newQuad(300, 0, 60,20, 600,20), - [7] = love.graphics.newQuad(360, 0, 60,20, 600,20), - [8] = love.graphics.newQuad(420, 0, 60,20, 600,20), - [9] = love.graphics.newQuad(480, 0, 60,20, 600,20), - [10] = love.graphics.newQuad(540, 0, 60,20, 600,20), - frames = 10, + frames = 20, repeated = true } } +local animations_big = { + default = { + frames = 20, + repeated = true + } +} +for i=1,10 do + local a = love.graphics.newQuad(i*118-118, 0, 118,51, 1180,51) + animations_big.default[i*2-1] = a + animations_big.default[i*2] = a + local a = love.graphics.newQuad(i*60-60, 0, 60,20, 600,20) + animations_small.default[i*2-1] = a + animations_small.default[i*2] = a +end +-- Map data return { -- GENERAL name = "alpha abyss", @@ -40,7 +46,8 @@ return { x = -60, y = 0, shape = {0,0, 117,0, 101,50, 16,50}, - sprite = "assets/platforms/alpha-big-1.png" + sprite = "assets/platforms/alpha-big.png", + animations = animations_big }, { x = -145, -- cgit v1.1