Ejemplo n.º 1
0
 private void Start()
 {
     stressScript = GetComponent <IStressable>();
     worker       = GetComponent <CoffeeWorker>();
     worker.OnSpeedMultiplierChanged += ControllSystem;
     worker.OnWorkDone        += SpawnAnnotation;
     worker.OnWorkDone        += PlayWorkDoneSound;
     worker.OnWorkStarted     += PlayWorkSound;
     stressScript.OnStressOut += PlayRageSound;
 }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        canvasGroup         = GetComponent <CanvasGroup>();
        canvas              = GetComponent <Canvas>();
        cam                 = Camera.main;
        canvas.worldCamera  = cam;
        stress              = stressAbleObject.GetComponent <IStressable>();
        rageSlider.maxValue = stress.MaxStress;

        stress.OnStressChanged += SetStressSliderValue;
        stress.OnStressChanged += StressValueChangedHandler;
        stress.OnStressChanged += SetStressBarColor;
    }
Ejemplo n.º 3
0
 protected void Initialize()
 {
     moveScript   = GetComponent <IMovable>();
     stressScript = GetComponent <IStressable>();
     GetRandomTexture();
 }