Esempio n. 1
0
        public IEnumerator DoGameOver(VisualWorker w, RectTransform t, float time = 1f)
        {
            gameObject.SetActive(true);
            transform.position   = t.position;
            transform.localScale = t.localScale;
            transform.DOMove(defaultPosition, time);
            transform.DOScale(defaultScale, time);
            anim.SetCharacter(w.anim.CharacterIndex);
            yield return(new WaitForSeconds(time + 0.5f));

            src.PlayOneShot(firedSound, 0.35f);
            firedGraphics.alpha = 1f;
            transform.DOScale(transform.localScale * 0.8f, 0.1f).SetEase(Ease.OutQuad);
            yield return(new WaitForSeconds(0.1f));

            transform.DOScale(defaultScale, 0.25f).SetEase(Ease.OutQuad);
        }
Esempio n. 2
0
 public void SetWorker(Worker w, int characterID)
 {
     AssociatedWorker                   = w;
     w.visualRepresentation             = this.gameObject;
     AssociatedWorker.OnFinishWord     += HandleWordFinished;
     AssociatedWorker.OnRequestNewWord += HandleNewWord;
     AssociatedWorker.OnFired          += HandleFired;
     anim.SetCharacter(characterID);
 }
Esempio n. 3
0
 // Start is called before the first frame update
 void Start()
 {
     hider.gameObject.SetActive(false);
     anim.SetCharacter(0);
 }