Last active
June 19, 2020 13:40
-
-
Save tajuszk/2ee2d3b37418202444fdb85fbe10a057 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 攻撃したらパワーアップ | |
function attackA () { | |
attackBase(10) // ダメージ10を与える | |
powerUp() // attackAは攻撃力が上がる | |
} | |
// 効果はないけどダメージが強い | |
function attackB () { | |
attackBase(20) // ダメージ20を与える | |
} | |
// 全ての攻撃の共通処理 | |
function attackBase (point) { | |
damage(point) // ダメージをpoint分与える | |
effect() // ダメージエフェクトを出す | |
comboCount++ // Comboカウントを増やす | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment