improvement(cbs): moar sfx

This commit is contained in:
Kazhnuz 2019-08-31 15:44:34 +02:00
parent 2d462dc7f7
commit ae47502dbf
13 changed files with 25 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -5,11 +5,14 @@ return {
effectArea = {0, 0, "line", 5, true}, -- which area is affected by the attack effectArea = {0, 0, "line", 5, true}, -- which area is affected by the attack
choregraphy = { choregraphy = {
{"setAnimation", "none", "spindash", false}, {"setAnimation", "none", "spindash", false},
{'playSFX', "none", 'spincharge'},
{"wait", "none", 0.5}, {"wait", "none", 0.5},
{"setAnimation", "none", "spin", false}, {"setAnimation", "none", "spin", false},
{'playSFX', "none", 'spinrelease'},
{"dashForward", "none", 12, true}, {"dashForward", "none", 12, true},
{"sendDamageFromPos", "none", 0, 0, 120, 100, false, false, true}, {"sendDamageFromPos", "none", 0, 0, 120, 100, false, false, true},
{'addGFX', "sentDamage", 'hitGFX', 0, 0, true, false}, {'addGFX', "sentDamage", 'hitGFX', 0, 0, true, false},
{'playSFX', "sentDamage", 'hitconnect'},
{'jumpBack', "none", true}, {'jumpBack', "none", true},
{'setAnimation', "none", 'idle', false}, {'setAnimation', "none", 'idle', false},
} }

View file

@ -18,9 +18,11 @@ return {
choregraphy = { -- the main attack choregraphy choregraphy = { -- the main attack choregraphy
{"setAnimation", "none", "spinjump", false}, {"setAnimation", "none", "spinjump", false},
{'playSFX', "none", 'jump'},
{'jumpToCursor', 'none', true}, {'jumpToCursor', 'none', true},
{"sendDamageFromCursor", "none", 0, 0, 110, 100, false, true, true}, {"sendDamageFromCursor", "none", 0, 0, 110, 100, false, true, true},
{'addGFX', "sentDamage", 'hitGFX', 0, 0, true, false}, {'addGFX', "sentDamage", 'hitGFX', 0, 0, true, false},
{'playSFX', "sentDamage", 'hitconnect'},
{'jumpBack', "none", true}, {'jumpBack', "none", true},
{'setAnimation', "none", 'idle', false}, {'setAnimation', "none", 'idle', false},
}, },

View file

@ -229,6 +229,7 @@ function Hero:receiveSignal(action_type, id)
elseif (action_type == "cursorMove") then elseif (action_type == "cursorMove") then
self:changeAnimation("walk", true) self:changeAnimation("walk", true)
self:goTo(self.world.cursor.x, self.world.cursor.y, 'cursorMove') self:goTo(self.world.cursor.x, self.world.cursor.y, 'cursorMove')
self.assets.sfx["woosh"]:play()
self.world.cursor:unset( ) self.world.cursor:unset( )
else else
self:switchActiveBattler( ) self:switchActiveBattler( )
@ -238,6 +239,7 @@ end
function Hero:receiveBackSignal() function Hero:receiveBackSignal()
self.world.cursor:set(self.x, self.y, "cursorMove") self.world.cursor:set(self.x, self.y, "cursorMove")
self:goTo(self.startx, self.starty, 'backMove') self:goTo(self.startx, self.starty, 'backMove')
self.assets.sfx["woosh"]:play()
self:changeAnimation("walk") self:changeAnimation("walk")
end end

View file

@ -37,5 +37,14 @@ return {
["sfx"] = { ["sfx"] = {
{"hit", "assets/sfx/hit.wav"}, {"hit", "assets/sfx/hit.wav"},
{"hitconnect", "assets/sfx/hitconnect.wav"}, {"hitconnect", "assets/sfx/hitconnect.wav"},
{"jump", "assets/sfx/jump.wav"},
{"woosh", "assets/sfx/woosh.wav"},
{"spincharge", "assets/sfx/spincharge.wav"},
{"spinrelease", "assets/sfx/spinrelease.wav"},
{"mBack", "assets/sfx/menus/back.wav"},
{"mBeep", "assets/sfx/menus/beep.wav"},
{"mSelect", "assets/sfx/menus/select.wav"},
{"mError", "assets/sfx/menus/error.wav"},
} }
} }

View file

@ -29,6 +29,8 @@ function MenuConstructor:build(character)
self:buildBaseMenu(character) self:buildBaseMenu(character)
self:buildSkillMenu(character) self:buildSkillMenu(character)
self:buildObjectMenu(character) self:buildObjectMenu(character)
self.controller.menusystem:setSoundFromSceneAssets("mBeep")
end end
function MenuConstructor:buildBaseMenu(character) function MenuConstructor:buildBaseMenu(character)
@ -271,14 +273,17 @@ end
function SubMenuWidget:new(character, menu_name, label, newmenu) function SubMenuWidget:new(character, menu_name, label, newmenu)
local label2 = "" local label2 = ""
self.sfx = "mBack"
if label ~= "back" then if label ~= "back" then
label2 = ">" label2 = ">"
self.sfx = "mBeep"
end end
SubMenuWidget.super.new(self, character, menu_name, label, label2) SubMenuWidget.super.new(self, character, menu_name, label, label2)
self.newmenu = newmenu or "BaseMenu" self.newmenu = newmenu or "BaseMenu"
end end
function SubMenuWidget:action() function SubMenuWidget:action()
self.assets.sfx[self.sfx]:play()
self.scene.menusystem:switchMenu(self.newmenu) self.scene.menusystem:switchMenu(self.newmenu)
end end
@ -290,6 +295,7 @@ function BackMenuWidget:new(character, menu_name)
end end
function BackMenuWidget:sendCharacterData() function BackMenuWidget:sendCharacterData()
self.assets.sfx["mBack"]:play()
self.character:receiveBackSignal() self.character:receiveBackSignal()
end end
@ -356,12 +362,15 @@ function SkillWidget:sendCharacterData()
local x, y, shape, size, direction = self:getActiveGrid() local x, y, shape, size, direction = self:getActiveGrid()
self.scene.world.cursor:setGridIgnoreActor(x, y, shape, size, direction) self.scene.world.cursor:setGridIgnoreActor(x, y, shape, size, direction)
self.scene.world.cursor:set(self.character.x, self.character.y, "skill", self.skillname) self.scene.world.cursor:set(self.character.x, self.character.y, "skill", self.skillname)
self.assets.sfx["mSelect"]:play()
else else
self.assets.sfx["mSelect"]:play()
self.character:useSkill(self.skillname, self.character.x, self.character.y) self.character:useSkill(self.skillname, self.character.x, self.character.y)
end end
else else
core.debug:warning("cbs/menu", "skill " .. self.skillname .. " doesn't exist") core.debug:warning("cbs/menu", "skill " .. self.skillname .. " doesn't exist")
self.character:receiveSignal("none") self.character:receiveSignal("none")
self.assets.sfx["mError"]:play()
end end
end end