Ajout des derniers développement #1
2 changed files with 20 additions and 20 deletions
|
@ -20,8 +20,6 @@ function Hero:new(world, x, y, owner, charnumber)
|
||||||
self:initSprite()
|
self:initSprite()
|
||||||
self:initChoregraphySystem()
|
self:initChoregraphySystem()
|
||||||
|
|
||||||
self:initVoices()
|
|
||||||
|
|
||||||
self.side = "heroes"
|
self.side = "heroes"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -53,8 +51,6 @@ function Hero:setActive()
|
||||||
|
|
||||||
self.world.cursor:set(self.startx, self.starty, "cursorMove")
|
self.world.cursor:set(self.startx, self.starty, "cursorMove")
|
||||||
|
|
||||||
--self:talk("turnstart")
|
|
||||||
|
|
||||||
self.directionPrevious = self.direction
|
self.directionPrevious = self.direction
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -343,22 +339,6 @@ function Hero:animationEnded(animation)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Hero:initVoices()
|
|
||||||
self:addVoiceEffect("move")
|
|
||||||
self:addVoiceEffect("turnstart")
|
|
||||||
end
|
|
||||||
|
|
||||||
function Hero:addVoiceEffect(name)
|
|
||||||
local completename = self.owner.name .. "_" .. name
|
|
||||||
local path = "datas/gamedata/characters/" .. self.owner.name .. "/voices/" .. name .. ".wav"
|
|
||||||
self.assets:newSFX(completename, path)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Hero:talk(name)
|
|
||||||
local completename = self.owner.name .. "_" .. name
|
|
||||||
self.assets.sfx[completename]:play()
|
|
||||||
end
|
|
||||||
|
|
||||||
-- DRAW FUNCTIONS
|
-- DRAW FUNCTIONS
|
||||||
-- Draw everything related to the hero
|
-- Draw everything related to the hero
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ function HeroFighter:new(owner, character, id)
|
||||||
self.super.new(self, owner, true, id)
|
self.super.new(self, owner, true, id)
|
||||||
|
|
||||||
self.statusbar = StatusBar(self)
|
self.statusbar = StatusBar(self)
|
||||||
|
self:initVoices()
|
||||||
|
|
||||||
self.action = nil
|
self.action = nil
|
||||||
|
|
||||||
|
@ -47,6 +48,7 @@ end
|
||||||
function HeroFighter:startAction()
|
function HeroFighter:startAction()
|
||||||
core.debug:print("cbs/heroFighter", "launching the action menu")
|
core.debug:print("cbs/heroFighter", "launching the action menu")
|
||||||
self.action = nil
|
self.action = nil
|
||||||
|
self:talk("turnstart")
|
||||||
self.turnSystem.scene.menu:set( self )
|
self.turnSystem.scene.menu:set( self )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -120,6 +122,24 @@ function HeroFighter:setPP(value, relative)
|
||||||
self.statusbar:updatePP()
|
self.statusbar:updatePP()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- VOICE SYSTEM
|
||||||
|
|
||||||
|
function HeroFighter:initVoices()
|
||||||
|
self:addVoiceEffect("move")
|
||||||
|
self:addVoiceEffect("turnstart")
|
||||||
|
end
|
||||||
|
|
||||||
|
function HeroFighter:addVoiceEffect(name)
|
||||||
|
local completename = self.name .. "_" .. name
|
||||||
|
local path = "datas/gamedata/characters/" .. self.name .. "/voices/" .. name .. ".wav"
|
||||||
|
self.assets:newSFX(completename, path)
|
||||||
|
end
|
||||||
|
|
||||||
|
function HeroFighter:talk(name)
|
||||||
|
local completename = self.name .. "_" .. name
|
||||||
|
self.assets.sfx[completename]:play()
|
||||||
|
end
|
||||||
|
|
||||||
-- DRAW FUNCTIONS
|
-- DRAW FUNCTIONS
|
||||||
function HeroFighter:drawIcon(x, y)
|
function HeroFighter:drawIcon(x, y)
|
||||||
local iconID = 1
|
local iconID = 1
|
||||||
|
|
Loading…
Reference in a new issue