Пример #1
0
 void Awake()
 {
     instance = this;
     //global script reference
     GlobalVars.GATHERING_TIMER    = this;
     GlobalVars.GATHERING_PLAYTIME = GlobalVars.COLLECT_TIME;
 }
Пример #2
0
 //super class constructor for powerups, should be called by all subclass constructors
 public PowerUp(string name, float?duration)
 {
     this.name     = name;
     this.duration = duration;
     allZones      = GlobalVars.GATHERING_ZONES;
     controller    = GlobalVars.GATHERING_CONTROLLER;
     timer         = GlobalVars.GATHERING_TIMER;
     level         = GetPowerUpLevel(this);
 }
    // Use this for initialization
    void Start()
    {
        findingTimeRemaining = GameObject.Find ("Controller").GetComponent<CollectionTimer> ();
        timeRemaining = findingTimeRemaining.GetTimeRemaining ();
        timeBarImage = GetComponent<Image> ();

        /*firstColor = new Color(100f/255f,160f/255f,42f/255f,1);
        secondColor = new Color ();
        thirdColor = new Color ();
        fourthColor = new Color ();*/
    }
    // Use this for initialization
    void Start()
    {
        findingTimeRemaining = GameObject.Find("Controller").GetComponent <CollectionTimer> ();
        timeRemaining        = findingTimeRemaining.GetTimeRemaining();
        timeBarImage         = GetComponent <Image> ();

        /*firstColor = new Color(100f/255f,160f/255f,42f/255f,1);
         * secondColor = new Color ();
         * thirdColor = new Color ();
         * fourthColor = new Color ();*/
    }
	void Awake () {
		instance = this;
		//global script reference
		GlobalVars.GATHERING_TIMER = this;
		GlobalVars.GATHERING_PLAYTIME = GlobalVars.COLLECT_TIME;
	}
 //sets the reference to the timer script
 public void setTimerInstance(CollectionTimer timerInstance)
 {
     this.timerInstance = timerInstance;
 }
 //sets the reference to the timer script
 public void setTimerInstance(CollectionTimer timerInstance)
 {
     this.timerInstance = timerInstance;
 }
Пример #8
0
 public override Task Stop()
 {
     CollectionTimer.Dispose();
     return(base.Stop());
 }