alpha 2
Before Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 2.3 KiB |
@ -5,7 +5,6 @@ import "CoreLibs/timer"
|
|||||||
import "CoreLibs/ui"
|
import "CoreLibs/ui"
|
||||||
import "CoreLibs/math"
|
import "CoreLibs/math"
|
||||||
|
|
||||||
|
|
||||||
-- Libraries
|
-- Libraries
|
||||||
import 'libraries/noble/Noble'
|
import 'libraries/noble/Noble'
|
||||||
import "libraries/AnimatedSprite"
|
import "libraries/AnimatedSprite"
|
||||||
@ -87,7 +86,6 @@ import "scripts/pageSprite"
|
|||||||
|
|
||||||
import "scenes/BaseScene"
|
import "scenes/BaseScene"
|
||||||
import 'scenes/Assemble'
|
import 'scenes/Assemble'
|
||||||
import 'scenes/DroneSelection'
|
|
||||||
import 'scenes/DroneCardSelector'
|
import 'scenes/DroneCardSelector'
|
||||||
import 'scenes/Menu'
|
import 'scenes/Menu'
|
||||||
import 'scenes/Game'
|
import 'scenes/Game'
|
||||||
@ -101,12 +99,15 @@ Difficulty = {
|
|||||||
DifficultySettings = {
|
DifficultySettings = {
|
||||||
[Difficulty.Easy] = {
|
[Difficulty.Easy] = {
|
||||||
assebleTime = 1700,
|
assebleTime = 1700,
|
||||||
|
distance = 200
|
||||||
},
|
},
|
||||||
[Difficulty.Medium] = {
|
[Difficulty.Medium] = {
|
||||||
assebleTime = 1000,
|
assebleTime = 1000,
|
||||||
|
distance = 350
|
||||||
},
|
},
|
||||||
[Difficulty.Hard] = {
|
[Difficulty.Hard] = {
|
||||||
assebleTime = 500,
|
assebleTime = 500,
|
||||||
|
distance = 500
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ name=FPV Game
|
|||||||
author=ut3usw
|
author=ut3usw
|
||||||
description=This is a FPV Game
|
description=This is a FPV Game
|
||||||
bundleID=guru.dead.fpv
|
bundleID=guru.dead.fpv
|
||||||
version=0.0.1
|
version=0.1.1
|
||||||
buildNumber=1
|
buildNumber=2
|
||||||
imagePath=assets/launcher/
|
imagePath=assets/launcher/
|
||||||
launchSoundPath=assets/launcher/sound.wav
|
launchSoundPath=assets/launcher/sound.wav
|
@ -1,117 +0,0 @@
|
|||||||
DroneSelection = {}
|
|
||||||
class("DroneSelection").extends(BaseScene)
|
|
||||||
local scene = DroneSelection
|
|
||||||
|
|
||||||
local fontSimple = Graphics.font.new('assets/fonts/peridot_7')
|
|
||||||
local fontMed = Graphics.font.new('assets/fonts/onyx_9')
|
|
||||||
local fontBig = Graphics.font.new('assets/fonts/diamond_20')
|
|
||||||
|
|
||||||
scene.inputHandler = {
|
|
||||||
AButtonDown = function()
|
|
||||||
scene.menuConfirmSound:play(1)
|
|
||||||
Noble.transition(Assemble)
|
|
||||||
end,
|
|
||||||
BButtonDown = function() end,
|
|
||||||
downButtonDown = function()
|
|
||||||
scene.menuSelSound:play(1)
|
|
||||||
if scene.menuIndex < 4 then
|
|
||||||
scene.menuIndex = scene.menuIndex + 1
|
|
||||||
else
|
|
||||||
scene.menuIndex = 1
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
leftButtonDown = function() end,
|
|
||||||
rightButtonDown = function() end,
|
|
||||||
upButtonDown = function()
|
|
||||||
scene.menuSelSound:play(1)
|
|
||||||
if scene.menuIndex > 1 then
|
|
||||||
scene.menuIndex = scene.menuIndex - 1
|
|
||||||
else
|
|
||||||
scene.menuIndex = 4
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
function scene:setValues()
|
|
||||||
self.dronesPreview = {}
|
|
||||||
self.background = Graphics.image.new("assets/sprites/selectionBg1")
|
|
||||||
self.dronesPreview[1] = Graphics.image.new("assets/sprites/assemble/1/8.png")
|
|
||||||
|
|
||||||
self.aKey = Graphics.image.new("assets/sprites/buttons/A")
|
|
||||||
|
|
||||||
scene.menuSelSound = playdate.sound.fileplayer.new("assets/audio/menu_select")
|
|
||||||
scene.menuSelSound:setVolume(0.5)
|
|
||||||
|
|
||||||
scene.menuConfirmSound = playdate.sound.fileplayer.new("assets/audio/confirm")
|
|
||||||
-- scene.menuConfirmSound:setVolume(0.5)
|
|
||||||
|
|
||||||
scene.unknownDrone = Graphics.image.new("assets/images/unk.png")
|
|
||||||
|
|
||||||
self.menuIndex = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
function scene:init()
|
|
||||||
scene.super.init(self)
|
|
||||||
scene:setValues()
|
|
||||||
end
|
|
||||||
|
|
||||||
function scene:start()
|
|
||||||
scene.super.start(self)
|
|
||||||
|
|
||||||
self.optionsMenu:addMenuItem("Main Menu", function() Noble.transition(Menu) end)
|
|
||||||
Noble.showFPS = false
|
|
||||||
end
|
|
||||||
|
|
||||||
function scene:enter()
|
|
||||||
scene.super.enter(self)
|
|
||||||
|
|
||||||
scene.selectionAnim = Selection(23, 54)
|
|
||||||
end
|
|
||||||
|
|
||||||
local elapsedTime = 0
|
|
||||||
function scene:update()
|
|
||||||
scene.super.update(self)
|
|
||||||
Noble.Text.draw("Select Drone", 200, 10, Noble.Text.ALIGN_CENTER, false, fontMed)
|
|
||||||
scene.selectionAnim:moveTo(23, 54 + (self.menuIndex - 1) * 46)
|
|
||||||
|
|
||||||
elapsedTime = elapsedTime + 1 / playdate.display.getRefreshRate()
|
|
||||||
local dy = 1 * math.sin(10 * elapsedTime)
|
|
||||||
|
|
||||||
local offset = 42
|
|
||||||
|
|
||||||
for i = 1, #Drones do
|
|
||||||
if Drones[i].locked == true then
|
|
||||||
Noble.Text.draw("UNAVAILABLE", 47, offset + 7, Noble.Text.ALIGN_LEFT, false, fontMed)
|
|
||||||
Noble.Text.draw("?", 16, offset + 4, Noble.Text.ALIGN_LEFT, false, fontBig)
|
|
||||||
else
|
|
||||||
Drones[i].preview:draw(6, offset)
|
|
||||||
|
|
||||||
Noble.Text.draw(Drones[i].name, 49, offset - 3, Noble.Text.ALIGN_LEFT, false, fontMed)
|
|
||||||
Noble.Text.draw("Price:", 49, offset + 15, Noble.Text.ALIGN_LEFT, false, fontSimple)
|
|
||||||
Noble.Text.draw("$" .. Drones[i].price, 103, offset + 15, Noble.Text.ALIGN_LEFT, false, fontSimple)
|
|
||||||
end
|
|
||||||
offset = offset + 46
|
|
||||||
end
|
|
||||||
|
|
||||||
if Drones[self.menuIndex].locked == false then
|
|
||||||
self.aKey:draw(330, 170 + dy) -- A key
|
|
||||||
Noble.Text.draw("Assemble", 348, 175, Noble.Text.ALIGN_LEFT, false, fontSimple) -- Assemble text
|
|
||||||
|
|
||||||
Graphics.drawTextInRect(Drones[self.menuIndex].description, 135, 200, 255, 100, nil, nil, nil, fontSimple) -- Description
|
|
||||||
Drones[self.menuIndex].full:draw(160, 35) -- Drone preview (full size)
|
|
||||||
else
|
|
||||||
Graphics.drawTextInRect("Unavailable right now", 135, 200, 255, 100, nil, nil, nil, fontSimple)
|
|
||||||
scene.unknownDrone:draw(184, 35)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function scene:exit()
|
|
||||||
scene.super.exit(self)
|
|
||||||
|
|
||||||
Noble.showFPS = false
|
|
||||||
end
|
|
||||||
|
|
||||||
function scene:finish()
|
|
||||||
scene.super.finish(self)
|
|
||||||
playdate.display.setScale(1)
|
|
||||||
end
|
|
@ -42,6 +42,7 @@ function scene:setValues()
|
|||||||
scene.resultShowed = false
|
scene.resultShowed = false
|
||||||
|
|
||||||
scene.musicEnabled = Noble.Settings.get("music")
|
scene.musicEnabled = Noble.Settings.get("music")
|
||||||
|
scene.difficulty = Noble.Settings.get("difficulty")
|
||||||
|
|
||||||
scene.balebas = {}
|
scene.balebas = {}
|
||||||
|
|
||||||
@ -54,7 +55,7 @@ function scene:setValues()
|
|||||||
|
|
||||||
scene.tank = nil
|
scene.tank = nil
|
||||||
|
|
||||||
scene.distance = 200
|
scene.distance = DifficultySettings[scene.difficulty].distance
|
||||||
end
|
end
|
||||||
|
|
||||||
function scene:init()
|
function scene:init()
|
||||||
|
@ -44,7 +44,7 @@ function Baleba:update()
|
|||||||
if self.player == nil or self.player.isMovingRight() == false then
|
if self.player == nil or self.player.isMovingRight() == false then
|
||||||
self.xVelocity = self.standrate
|
self.xVelocity = self.standrate
|
||||||
else
|
else
|
||||||
self.xVelocity = 2 + self.standrate
|
self.xVelocity = 1.2 + self.standrate
|
||||||
end
|
end
|
||||||
|
|
||||||
self:moveTo(self.x - self.xVelocity, self.y)
|
self:moveTo(self.x - self.xVelocity, self.y)
|
||||||
|