public void testAttack() { UpdateLog("Attack Test"); testModel.Attack(0, () => { AppendLog("Attack Done!"); }, () => { AppendLog("Hit Triggered!"); } ); }
public void AttackChain() { Vector2 endPos = new Vector2(-3, 1); AnimeCallback hitCallback = () => { Debug.Log("Attack hit!"); }; AnimeCallback endCallback = () => { Debug.Log("Attack Chain End!"); }; hero.MoveForward(endPos, () => { hero.Attack(1, () => { hero.MoveBack(endCallback); }, hitCallback); }); }
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); }); }); }
public void ShowAttackAnime() { hero.Attack(0); }