Exemplo n.º 1
0
        private void DoAttack(int atkId, int targetId)
        {
            var atkUnit    = battleManager.GetSam(atkId);
            var targetUnit = battleManager.GetSam(targetId);

            var unitPos = new Point(targetUnit.X * TileManager.CellSize - baseX,
                                    targetUnit.Y * TileManager.CellSize - baseY);
            var unitSize = new Size(TileManager.CellSize, TileManager.CellSize);

            var effect = new StaticUIEffect(EffectBook.GetEffect("hit1"), unitPos, unitSize);

            effectRun.AddEffect(effect);

            coroutineManager.StartCoroutine(DelayAttack(atkUnit, targetUnit));

            if (atkUnit.Camp == (byte)ConfigDatas.CampConfig.Indexer.Reborn)  //todo 略ws
            {
                attackId  = 0;
                savedPath = null;
                stage     = ControlStage.AttackAnim;
            }

            refreshAll.Fire();
        }
Exemplo n.º 2
0
 public static void Start(IEnumerator routine)
 {
     coroutineManager.StartCoroutine(routine);
 }