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!"); } // ); }
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); }); }); }
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); }); }); }