Exemple #1
0
    // Use this for initialization
    void Start()
    {
        animator     = GetComponentInChildren <Animator>();
        playerRb     = GetComponent <Rigidbody>();
        playerHealth = GetComponent <PlayerHealth>();
        playerWeapon = GetComponent <WeaponPlayer>();

        Inventory.instance.onWeaponChangedCallback += OnWeaponChanged;
        footsteps = GetComponent <AudioSource>();
    }
Exemple #2
0
 public int GetAmmoCount(WeaponPlayer.WeaponInput type)
 {
     switch (type) {
     case WeaponPlayer.WeaponInput.Primary:
         return -1;
     case WeaponPlayer.WeaponInput.Secondary:
         return GetSecondaryAmmoCount();
     case WeaponPlayer.WeaponInput.Tertiary:
         return GetTertiaryAmmoCount();
     default:
         return -1;
     }
 }
Exemple #3
0
 public void AddAmmoCount(int amount, WeaponPlayer.WeaponInput type)
 {
     switch(type) {
     case WeaponPlayer.WeaponInput.Primary:
         break;
     case WeaponPlayer.WeaponInput.Secondary:
         AddSecondaryAmmoCount(amount);
         break;
     case WeaponPlayer.WeaponInput.Tertiary:
         AddTertiaryAmmoCount(amount);
         break;
     default:
         break;
     }
 }
    void Start()
    {
        this._tank = new TankPlayer();
        this._tank.Start();
        this._weapon = new WeaponPlayer();
        this._weapon.Start();

        this._weapon.Tank = this._tank;
        this._isReadyToShot = true;

        this._bowObject = transform.FindChild("Bow").gameObject;
    }
    void Start()
    {
        this._bowAssembleSound = (AudioClip)Resources.Load ("Sounds/Player/BowAssemble");
        this._tank = new TankPlayer();
        this._tank.Start();
        this._weapon = new WeaponPlayer();
        this._weapon.Start();

        this._weapon.Tank = this._tank;
        this._isReadyToShot = true;
    }
Exemple #6
0
 // Use this for initialization
 void Start()
 {
     maxWidth = width;
     weapon = weaponObject.GetComponent<WeaponPlayer>();
 }
Exemple #7
0
 // Use this for initialization
 void Start()
 {
     maxWidth = width;
     weapon   = weaponObject.GetComponent <WeaponPlayer>();
 }