Ejemplo n.º 1
0
    private bool GameFinished;          // disable movement and  shooting when the player is dead
    // All Components get initialized
    void Awake()
    {
        Player = GameObject.FindGameObjectWithTag("Player"); // identify the player to chase
        EnemySpawns.EnemyCount++;                            // increase the global enemycount by 1
        Stats = GetComponent <Objectstats>();
        rb    = GetComponent <Rigidbody>();

        MovementEasy = GetComponent <EnemyMovementEasy>();
        //MovementMedium  = GetComponent<EnemyMovementMedium>();
        // MovementHard    = GetComponent<EnemyMovementHard>();
        ShootingEasy = GetComponent <EnemyShootingEasy>();
        //ShootingMedium  = GetComponent<EnemyShootingMedium>();
        // ShootingHard    = GetComponent<EnemyShootingHard>();

        //ShootingMedium.enabled = false;
        //ShootingHard.enabled = false;
        //MovementMedium.enabled = false;
        //MovementHard.enabled = false;
    }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     rb        = GetComponent <Rigidbody>();
     floormask = LayerMask.GetMask("Floor");
     Stats     = GetComponent <Objectstats>();
 }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     Stats = GetComponent <Objectstats>();
 }
Ejemplo n.º 4
0
    //private Ray RayToPlayer;
    //private RaycastHit RayHitPlayerFound;
    // Use this for initialization
    void Awake()
    {
        Stats = GetComponent <Objectstats>();

        Controller = GetComponent <UnitController>();
    }
Ejemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     WeaponController = GetComponent <EnemyWeaponController>();
     Stats            = GetComponent <Objectstats>();
 }