コード例 #1
0
    public void testMove()
    {
        UpdateLog("Move Test");

        AppendLog("Move Forward");
        testModel.MoveForward(targetPos, () => {
            AppendLog("Move Back");
            testModel.MoveBack(() => {
                AppendLog("Move Done!");
            });
        });
        // UpdateLog("Skill Test");
        // testModel.Attack(1,
        //              () => { AppendLog("Hit Triggered!"); },
        //              () => { AppendLog("Skill Done!"); }
        //      );
    }
コード例 #2
0
    public void AttackChain()
    {
        Vector2 endPos = new Vector2(-3, 1);

        BattleModel.Callback hitCallback = () => {
            Debug.Log("Attack hit!");
        };


        BattleModel.Callback endCallback = () => {
            Debug.Log("Attack Chain End!");
        };

        hero.MoveForward(endPos, () => {
            hero.Attack(1, hitCallback, () => {
                hero.MoveBack(endCallback);
            });
        });
    }
コード例 #3
0
    protected void StartMovingAttack()
    {
        BattleModel.Callback hitCallback = () => {
            OnAttackHit();
        };


        BattleModel.Callback endCallback = () => {
            Debug.Log(" Move Bak done");
            MarkAsDone();
        };

        Debug.Log("Start Moving Fwd: targetPos=" + targetPostion);
        actor.MoveForward(targetPostion, () => {
            Debug.Log("Start Attack");
            actor.Attack(style, hitCallback, () => {
                Debug.Log("Start Move Bak");
                actor.MoveBack(endCallback);
            });
        });
    }