Пример #1
0
 private void Start()
 {
     fixzilla          = FindObjectOfType <Fixzilla>();
     fixzilla.TooFast += OnFixzillaRun;
     fixzilla.GetComponent <JumpingObject>().Landed += OnFixzillaLanded;
     camera          = Camera.main.gameObject;
     defaultPosition = camera.transform.localPosition;
     rewiredPlayer   = ReInput.players.GetPlayer(playerId);
 }
Пример #2
0
 private void Awake()
 {
     fixzilla              = FindObjectOfType <Fixzilla>();
     fixzilla.TooFast     += PrepareEarthquake;
     fixzilla.NormalSpeed += StopEarthQuake;
     fixzilla.GetComponent <JumpingObject>().Landed += OnEarthQuake;
     audioSource             = gameObject.AddComponent <AudioSource>();
     cooldownTimer           = cooldown;
     audioSourceMultichannel = GetComponent <AudioSourceMultichannel>();
     foreach (var crowd in crowds)
     {
         crowd.gameObject.SetActive(false);
     }
     activeCrowds  = 0;
     rewiredPlayer = ReInput.players.GetPlayer(playerId);
 }