// Use this for initialization
 void Start()
 {
     ShotReady      = true;
     SelectedWeapon = Weapons[0];
     ShotSpawn      = ShotSpawns[0];
     Stats          = SelectedWeapon.GetComponent <EnemyWeaponStats>();
 }
Пример #2
0
 // private Collider others;
 // Use this for initialization
 void Start()
 {
     rb    = GetComponent <Rigidbody>();
     Stats = GetComponent <EnemyWeaponStats>();
     if (Stats.IsAdditionalShot == false)
     {
         transform.parent = null;
     }
     rb.velocity = transform.forward * Stats.speed;
 }
Пример #3
0
    private PlayerController UnitHit; // Reference to the Unit that got Hit

    // Use this for initialization
    void Start()
    {
        Stats = GetComponent <EnemyWeaponStats>();
    }
 public void SelectWeapon(string Name)
 {
     SelectedWeapon = Weapons[WeaponDictionary[Name]];
     ShotSpawn      = ShotSpawns[0];
     Stats          = SelectedWeapon.GetComponent <EnemyWeaponStats>();
 }