Ejemplo n.º 1
0
        protected override void OnButtonClick(Button btn)
        {
            switch (btn.name)
            {
            case "DebugEnd":

                //BattleEnd();
                break;

            case "PlayerUnit":
            case "EnemyUnit":
                var unit = btn.GetComponent <Unit>();
                if (unit.Selectable)
                {
                    currentCommand.target = unit;

                    if (actionGroup.ActiveToggles().Contains(normal))
                    {
                        // 通常攻撃
                        currentCommand.action = Identify.Empty;
                    }
                    else
                    {
                        // スキル
                        currentCommand.action = new Identify(currentCommand.behavior.PetItem.skill);
                    }
                    combat.AddCommand(currentCommand);
                    combat.Next();
                }
                break;

            default:
                base.OnButtonClick(btn);
                break;
            }
        }