AttackArea.FixedUpdate C# (CSharp) Méthode

FixedUpdate() public méthode

public FixedUpdate ( ) : void
Résultat void
    public void FixedUpdate()
    {
        this.sphereColliderRigidBody.WakeUp();

        if (this.enemiesInAttackRange.Count > 0) {
            foreach (GameUnit unit in this.enemiesInAttackRange) {
                if (unit == null) {
                    this.removeList.Add(unit);
                }
            }
        }

        if (this.otherEnemies.Count > 0) {
            for (int i = 0; i < this.otherEnemies.Count; i++) {
                if (this.otherEnemies[i] == null) {
                    this.otherEnemies.RemoveAt(i);
                }
            }
        }

        if (this.removeList.Count > 0) {
            foreach (GameUnit unit in this.removeList) {
                if (this.enemiesInAttackRange.Contains(unit)) {
                    this.enemiesInAttackRange.Remove(unit);
                }
            }
            this.removeList.Clear();
        }
    }