void Start()
 {
     // Get the components for the Motor and Data
     data = GetComponent<ShipData>();
     engine = GetComponent<ShipEngine>();
     shooter = GetComponent<ShipShooter>();
 }
Beispiel #2
0
    public override void DenyPower()
    {
        ShipShooter shooter = ship.GetComponent <ShipShooter>();

        shooter.activeWeapon = (int)ShipShooter.Weapons.Default;
        base.DenyPower();
    }
Beispiel #3
0
 private void Awake()
 {
     mover            = GetComponent <ShipMover>();
     shooter          = GetComponent <ShipShooter>();
     health           = gameObject.GetComponent <TakeDamage>();
     powerupManager   = GetComponent <PowerupManager>();
     forwardMoveSpeed = maxSpeed;
 }
Beispiel #4
0
    public override void GrantPower()
    {
        ShipShooter shooter      = ship.GetComponent <ShipShooter>();
        int         weaponChoice = Random.Range(1, (int)ShipShooter.Weapons.Count);

        shooter.activeWeapon = weaponChoice;
        base.GrantPower();
    }
Beispiel #5
0
    protected override void Start()
    {
        base.Start();

        _gameManager.Player = this;
        _screenManager      = ScreenManager.Instance;

        _shipShooterScript = GetComponent <ShipShooter>();
    }
Beispiel #6
0
 // Awake is called:
 // exactly once in the lifetime of the script (like Start).
 // upon GO activation or if a fn in any script attached to it is called.
 // even if the script is disabled
 // before any Start functions
 // after all GO's are initialized
 // USAGE: initialize any references, variables, or game state before the game starts.
 void Awake()
 {
     m_ShipShooter = FindObjectOfType <ShipShooter>(); // meh, there aren't many objects in the scene.
 }
 // Awake is called:
 // exactly once in the lifetime of the script (like Start).
 // upon GO activation or if a fn in any script attached to it is called.
 // even if the script is disabled
 // before any Start functions
 // after all GO's are initialized
 // USAGE: initialize any references, variables, or game state before the game starts.
 void Awake()
 {
     m_ShipShooter = FindObjectOfType<ShipShooter>(); // meh, there aren't many objects in the scene.
 }
 protected override void Start()
 {
     base.Start();
     _shipShooterScript = GetComponent <ShipShooter>();
 }