restructured folder
This commit is contained in:
parent
e51905de67
commit
8ddf3610ac
|
@ -194,12 +194,11 @@ function Player:DoPhysics()
|
||||||
if self.isHooked then
|
if self.isHooked then
|
||||||
local hook = Vector(self.pos.x, self.pos.y, self.hookAnchor.x, self.hookAnchor.y)
|
local hook = Vector(self.pos.x, self.pos.y, self.hookAnchor.x, self.hookAnchor.y)
|
||||||
if GetVectorValue(hook) > self.hookedDistance then
|
if GetVectorValue(hook) > self.hookedDistance then
|
||||||
self.canFall = false
|
|
||||||
local hook_angle = GetAngleFromVector(hook[1],hook[2])
|
local hook_angle = GetAngleFromVector(hook[1],hook[2])
|
||||||
--pos_x = self.hookAnchor.x + self.hookedDistance * math.cos(-math.rad(180)+hook_angle) + ((gravity ^ 2)/2) * math.sin(hook_angle)
|
local pos_x = self.hookAnchor.x + self.hookedDistance * math.cos(-math.rad(180)+hook_angle)
|
||||||
--pos_y = self.hookAnchor.y + self.hookedDistance * math.sin(-math.rad(180)+hook_angle) + ((gravity ^ 2)/2) * math.cos(hook_angle)
|
local pos_y = self.hookAnchor.y + self.hookedDistance * math.sin(-math.rad(180)+hook_angle)
|
||||||
self.vel.x = self.vel.x + gravity * (-math.sin(hook_angle))
|
self.vel.x = self.vel.x + pos_x - self.pos.x
|
||||||
self.vel.y = self.vel.y + gravity * math.cos(hook_angle)
|
self.vel.y = self.vel.y + pos_y - self.pos.y
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -248,10 +248,10 @@ function Entity:Debug()
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
require "data/scripts/entities/kupo"
|
require "code/entities/kupo"
|
||||||
require "data/scripts/entities/arrow"
|
require "code/entities/arrow"
|
||||||
require "data/scripts/entities/decoration"
|
require "code/entities/decoration"
|
||||||
require "data/scripts/entities/player"
|
require "code/entities/player"
|
||||||
require "data/scripts/entities/fairy"
|
require "code/entities/fairy"
|
||||||
require "data/scripts/entities/cursed_book"
|
require "code/entities/cursed_book"
|
||||||
require "data/scripts/entities/particle"
|
require "code/entities/particle"
|
|
@ -0,0 +1,33 @@
|
||||||
|
-- data
|
||||||
|
require "data/animations"
|
||||||
|
require "data/shaders"
|
||||||
|
require "data/tiledata"
|
||||||
|
require "data/music"
|
||||||
|
require "data/sfx"
|
||||||
|
require "code/locale"
|
||||||
|
|
||||||
|
-- support functions
|
||||||
|
require "code/math"
|
||||||
|
require "code/hex"
|
||||||
|
require "code/in_out"
|
||||||
|
|
||||||
|
-- classes
|
||||||
|
require "code/audio"
|
||||||
|
require "code/entity"
|
||||||
|
require "code/animation"
|
||||||
|
require "code/collision"
|
||||||
|
require "code/level"
|
||||||
|
require "code/camera"
|
||||||
|
require "code/lights"
|
||||||
|
require "code/objects"
|
||||||
|
|
||||||
|
-- UI functions
|
||||||
|
require "code/debug"
|
||||||
|
require "code/keybind"
|
||||||
|
require "code/menu"
|
||||||
|
require "code/ui"
|
||||||
|
|
||||||
|
-- game loop
|
||||||
|
require "code/game"
|
||||||
|
require "code/gameworld"
|
||||||
|
require "code/editor"
|
|
@ -5,5 +5,5 @@ function AddElement(self)
|
||||||
self.id = #UIElement
|
self.id = #UIElement
|
||||||
end
|
end
|
||||||
|
|
||||||
require "data/scripts/ui/button"
|
require "code/ui/button"
|
||||||
require "data/scripts/ui/dialog"
|
require "code/ui/dialog"
|
|
@ -1,29 +0,0 @@
|
||||||
-- data
|
|
||||||
require "data/animations"
|
|
||||||
require "data/shaders"
|
|
||||||
require "data/tiledata"
|
|
||||||
require "data/music"
|
|
||||||
require "data/sfx"
|
|
||||||
require "data/scripts/locale"
|
|
||||||
-- support functions
|
|
||||||
require "data/scripts/math"
|
|
||||||
require "data/scripts/hex"
|
|
||||||
require "data/scripts/in_out"
|
|
||||||
-- classes
|
|
||||||
require "data/scripts/audio"
|
|
||||||
require "data/scripts/entity"
|
|
||||||
require "data/scripts/animation"
|
|
||||||
require "data/scripts/collision"
|
|
||||||
require "data/scripts/level"
|
|
||||||
require "data/scripts/camera"
|
|
||||||
require "data/scripts/lights"
|
|
||||||
require "data/scripts/objects"
|
|
||||||
-- UI functions
|
|
||||||
require "data/scripts/debug"
|
|
||||||
require "data/scripts/keybind"
|
|
||||||
require "data/scripts/menu"
|
|
||||||
require "data/scripts/ui"
|
|
||||||
-- game loop
|
|
||||||
require "data/scripts/game"
|
|
||||||
require "data/scripts/gameworld"
|
|
||||||
require "data/scripts/editor"
|
|
|
@ -0,0 +1 @@
|
||||||
|
sfx = {}
|
Loading…
Reference in New Issue