Exemplo n.º 1
0
        /// <summary>
        /// Called from vehicle class to init
        /// </summary>
        public void Init(EnemyVehicle vehicle)
        {
            this.vehicle = vehicle;
            this.target  = null;
            damageable   = GetComponent <Collider>();
            State        = PassengerState.Nothing;

            Debug.Assert(passengerAnimation != null, "Passenger animation is not set", this);
            passengerAnimation.Init(this);

            minAttackDistanceSqr = data.MinAttackDistance * data.MinAttackDistance;
            maxAttackDistanceSqr = data.MaxAttackDistance * data.MaxAttackDistance;
        }
 public void Init(EnemyVehicle vehicle)
 {
     this.vehicle = vehicle;
     meshCollider = GetComponent <MeshCollider>();
     allColliders = GetComponents <Collider>();
 }