Exemplo n.º 1
0
 protected virtual void Start()
 {
     mortality        = GetComponent <Mortality>();
     orientableEntity = GetComponent <OrientableEntity>();
     mortality.Revive();
     mortality.OnDeath      += OnDeath;
     mortality.OnHealthDown += OnHealthDown;
 }
    protected override void Start()
    {
        base.Start();
        mortality = GetComponent <Mortality>();
        mortality.initialHealth = 150;
        mortality.Revive();
        // GameObject.Find("UI Life Text").GetComponent<Text>().text = "150/150";

        mortality.OnHealthDown += OnLoseLife;

        GameManager.instance.uiManager.SetLife(mortality.health, mortality.health);
        GameManager.instance.uiManager.SetXp(currentXp, currentXp);
        GameManager.instance.uiManager.SetMoney(currentMoney, currentMoney);
    }