Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        gameSession = FindObjectOfType <GameSession>();
        rb          = GetComponent <Rigidbody2D>();

        playerShip = GetComponent <PlayerShipSetter>();
    }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        DisableButton(shopButton);

        playerShip  = FindObjectOfType <PlayerShipSetter>();
        gameSession = FindObjectOfType <GameSession>();
        UpdateShopItemPrices();
        UpdateShipPurchaseButtons();
    }
Example #3
0
    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);
    }
Example #4
0
 // Start is called before the first frame update
 void Start()
 {
     bullet.bulletObject = bulletObject;
     UpdateBulletText();
     playerShip = GetComponent <PlayerShipSetter>();
 }