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

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

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