// Start is called before the first frame update void Start() { gameSession = FindObjectOfType <GameSession>(); rb = GetComponent <Rigidbody2D>(); playerShip = GetComponent <PlayerShipSetter>(); }
// Start is called before the first frame update void Start() { DisableButton(shopButton); playerShip = FindObjectOfType <PlayerShipSetter>(); gameSession = FindObjectOfType <GameSession>(); UpdateShopItemPrices(); UpdateShipPurchaseButtons(); }
internal override void PickedUp() { PlayerShipSetter player = FindObjectOfType <PlayerShipSetter>(); FindObjectOfType <GameSession>().UpdateScoreByOne(); if (player.health < player.maxHealth) { player.health++; } GameObject.Find("Health Bar").GetComponent <SimpleHealthBar>().UpdateBar(player.health, player.maxHealth); }
// Start is called before the first frame update void Start() { bullet.bulletObject = bulletObject; UpdateBulletText(); playerShip = GetComponent <PlayerShipSetter>(); }