Ajout des derniers développement #1

Merged
kazhnuz merged 68 commits from chronicles-cbs into master 2020-08-02 11:14:18 +02:00
3 changed files with 17 additions and 2 deletions
Showing only changes of commit 2e38b31dea - Show all commits

View file

@ -11,7 +11,7 @@ end
function AttackAction:startAction()
core.debug:print("cbs/action", "Starting attack action")
self:finishAction()
self:loadChoregraphy("attack")
end
return AttackAction

View file

@ -1,5 +1,7 @@
local ActionParent = Object:extend()
local ChoregraphySystem = require "scenes.battlesystem.controllers.fighters.systems.choregraphy"
function ActionParent:new(fighter)
self.fighter = fighter
self.target = nil
@ -14,6 +16,15 @@ function ActionParent:update(dt)
end
end
function ActionParent:loadChoregraphy(skillname)
local skill = game.skills:getSkillData(skillname)
self.choregraphy = ChoregraphySystem(self, skill.choregraphy)
end
function ActionParent:loadChoregraphyFromSkill(skill)
self.choregraphy = ChoregraphySystem(self, skill.choregraphy)
end
function ActionParent:needTarget()
-- needTarget, targetEnnemies
return false, false
@ -28,6 +39,10 @@ function ActionParent:start()
self:startAction()
end
function ActionParent:choregraphyEnded()
self:finishAction()
end
function ActionParent:startAction()
self:finishAction()

View file

@ -12,7 +12,7 @@ end
function SkillAction:startAction()
core.debug:print("cbs/action", "Starting flee action")
self:finishAction()
self:loadChoregraphyFromSkill(self.data)
end
return SkillAction