void Awake()
    {
        CountdownText.gameObject.SetActive(false);
        _subscriptions      = new Mediator.Subscriptions();
        _startGameCallback += StartGame;
        _exitGameCallback  += ExitGame;
        _subscriptions.Subscribe(StartButton.name, _startGameCallback);
        _subscriptions.Subscribe(ExitButton.name, _exitGameCallback);

        StartButton.onClick.AddListener(Notify);
        ExitButton.onClick.AddListener(Notify);
    }
Example #2
0
 private void Awake()
 {
     print(gameObject.name + " turned on");
     _targetScore            = transform.childCount;
     _subscriptions          = new Mediator.Subscriptions();
     IncrementScoreCallback += IncrementScore;
     _subscriptions.Subscribe(gameObject.name, IncrementScoreCallback);
 }
Example #3
0
    private void Awake()
    {
        if (valveTag == null || valveTag == "")
        {
            return;
        }

        adjustFlow = SetFlowRate;
        subscriptions.Subscribe(valveTag.ToLower() + "->setflow", adjustFlow);
    }
    void Awake()
    {
        animation = GetComponent <Animation>();
        animation.playAutomatically = true;
        animationState       = animation[animation.clip.name];
        animationState.speed = 0;

        animLength = animationState.length;

        setAnimationScrubSpeed = ScrubAnimation;
        subscriptions.Subscribe(gameObject.GetInstanceID().ToString() + "->setanimspeed", setAnimationScrubSpeed);
    }