public void AddOrSubtractLife(object sender, Events.CollectableEventArgs e) { if (e.collectableObjectData.LifeIfFallOut != 0) { valueToAdd = e.collectableObjectData.LifeIfFallOut; } else { valueToAdd = e.collectableObjectData.LifeIfCollected; } if (life < 5 || valueToAdd < 0) { life += valueToAdd; LifeText.text = life.ToString(); //Debug.Log("Life " + life); } if (life <= 0) { Events.instance.EndGameRaiseEvent(); } }
public void InfoChange(object sender, Events.CollectableEventArgs e) { infoText.color = startColor; infoText.text = e.collectableObjectData.SpecialText; }
public void addTime(object sender, Events.CollectableEventArgs e) { time += e.collectableObjectData.TimeAdd; //Debug.Log("Score " + time); }
private void ReturnToPool(object sender, Events.CollectableEventArgs e) { e.collectableGameObject.SetActive(false); ActiveGameObjects.RemoveAt(ActiveGameObjects.IndexOf(e.collectableGameObject)); }
public void AddScore(object sender, Events.CollectableEventArgs e) { score += e.collectableObjectData.Points; ScoreText.text = score.ToString(); }