Exemplo n.º 1
0
        private void Update()
        {
            while (bridgeTasks.Count > 0)
            {
                BridgeTask currentTask = bridgeTasks.Dequeue();
                switch (currentTask.bridgeParamentType)
                {
                case BridgeParamentType.TUnitNormalAttackTUnit:
                {
                    TUnit dC = currentTask.destinationComponent as TUnit;
                    if (dC.unit.IsDead)
                    {
                    }
                    else
                    {
                        dC.unit.BeingAttack((int)currentTask.parament);
                    }
                }
                break;

                case BridgeParamentType.TUnitPoisonAttackTUnit:
                {
                    TUnit dC = currentTask.destinationComponent as TUnit;
                    if (dC.unit.IsDead)
                    {
                    }
                    else
                    {
                        StartCoroutine(
                            dC.unit.PositionEffect(
                                bridgeTasks, currentTask.originComponent,
                                (AllowedParaments.PoisonAttackRequestParament)currentTask.parament,
                                currentTask.destinationComponent
                                ));
                    }
                }
                break;

                case BridgeParamentType.Chara_MousePosition_RayMapPathFinding:
                {
                    rayMapPathFinding.RayMapPathFinding dC = currentTask.destinationComponent as rayMapPathFinding.RayMapPathFinding;
                    dC.Entrance((Vector2)currentTask.parament);
                }
                break;

                default:
                    break;
                }
            }
        }
Exemplo n.º 2
0
 public void EnqueueTask(BridgeTask inTask)
 {
     bridgeTasks.Enqueue(inTask);
 }