Example #1
0
    public void Initialize()
    {
        ammoPacks          = new List <GameObject>();
        healthPacks        = new List <GameObject>();
        objectiveComponent = GetComponent <ObjectiveComponent>();
        currentTimer       = 0.0f;
        currentHealthTimer = 0.0f;
        currentAmmoTimer   = 0.0f;
        maxTimer           = 300;
        gameOver           = false;
        GameObject playerHUD = GameObject.Find("playerHUD");

        timerText = playerHUD.GetComponentsInChildren <Text>().Where(x => x.name == "timer").First();
    }
Example #2
0
 public AddObjectiveEvent(string id, ObjectiveComponent oc, bool sideOjbective = true) : base(id)
 {
     objectiveToAdd     = oc;
     this.sideObjective = sideOjbective;
 }