- [NEW] Afegit cooldown entre dispar i dispar
- [NEW] mòdul console - [NEW] mòdul tweening - [NEW] mòdul palfade
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
require "palfade"
|
||||
require "console"
|
||||
require "tweening"
|
||||
|
||||
function test()
|
||||
tweening.add(40, 100, 1, easing.easeOutCubic, function(value, progress, finished) sprites.hero.light = value end)
|
||||
tweening.add(0, 1, 1, easing.easeOutCubic, function(value, progress, finished) palfade.fade_reddish(value) end)
|
||||
end
|
||||
|
||||
game = {
|
||||
chg_adv = {x=0, y=0},
|
||||
chg_step = 0,
|
||||
@@ -10,6 +19,7 @@ game = {
|
||||
light_strobe_value = 0,
|
||||
light_strobe_dir = 1,
|
||||
water_counter = 0,
|
||||
fade=0,
|
||||
|
||||
enable = function()
|
||||
if game.back_buf == 0 then
|
||||
@@ -18,12 +28,23 @@ game = {
|
||||
end
|
||||
app.update = game.update
|
||||
sys.beat(2)
|
||||
palfade.init()
|
||||
--palfade.fade_reddish(0.5)
|
||||
--shader.enable();
|
||||
end,
|
||||
|
||||
update = function()
|
||||
tweening.update(sys.delta())
|
||||
game.water_counter = game.water_counter + 0.05
|
||||
|
||||
if game.fade>0 then
|
||||
palfade.fade_red(game.fade)
|
||||
game.fade = game.fade - 0.1
|
||||
elseif game.fade<0 then
|
||||
palfade.fade_red(0)
|
||||
game.fade = 0
|
||||
end
|
||||
|
||||
view.origin(0,0)
|
||||
surf.target(0)
|
||||
view.clip()
|
||||
@@ -41,6 +62,8 @@ game = {
|
||||
if key.press(key.ESCAPE) or key.press(key.F9) then
|
||||
rooms.retrieve_original_items()
|
||||
editor.enable()
|
||||
elseif key.press(key.GRAVE) then
|
||||
console.enable()
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user