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
choregraphy = {
{"setAnimation", "none", "spindash", false},
{'playSFX', "none", 'spincharge'},
{"wait", "none", 0.5},
{"setAnimation", "none", "spin", false},
{'playSFX', "none", 'spinrelease'},
{"dashForward", "none", 12, true},
{"sendDamageFromPos", "none", 0, 0, 120, 100, false, false, true},
{'addGFX', "sentDamage", 'hitGFX', 0, 0, true, false},
{'playSFX', "sentDamage", 'hitconnect'},
{'jumpBack', "none", true},
{'setAnimation', "none", 'idle', false},
}

View file

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

View file

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

View file

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