Example #1
0
        public void OnPlayerSpawned(TrackSpectator player)
        {
            this.player  = player.gameObject.GetComponent <Player>();
            this.scoreUI = GameObject.FindWithTag("InGameUI").transform.Find("Score").GetComponent <Text>();

            StartCoroutine(UpdateScore());
        }
Example #2
0
        public static void PlayerDestroyed()
        {
            EventManager.player  = null;
            onPlayerInvulnerable = null;

            if (onPlayerDestroyed != null)
            {
                onPlayerDestroyed();
            }
        }
Example #3
0
        public static void PlayerSpawned(TrackSpectator player)
        {
            EventManager.player  = player;
            onPlayerInvulnerable = null;

            if (onPlayerSpawned != null)
            {
                onPlayerSpawned(player);
            }
        }
 public void OnPlayerDestroyed()
 {
     this.player = null;
 }
 public void OnPlayerSpawned(TrackSpectator player)
 {
     this.player = player;
     this.player.TrackGenerator = this;
 }
Example #6
0
 public void OnPlayerSpawned(TrackSpectator player)
 {
     this.GetComponent <TransformConstraint>().target = player.transform;
 }
Example #7
0
 public void OnPlayerSpawned(TrackSpectator player)
 {
     this.player         = player;
     this.shipController = this.player.GetComponent <ShipController>();
 }
Example #8
0
 public void OnPlayerDestroyed()
 {
     this.player = null;
     this.GetComponent <SmoothFollow>().enabled = false;
     this.GetComponent <SmoothFollow>().target  = null;
 }
Example #9
0
 public void OnPlayerSpawned(TrackSpectator player)
 {
     this.player = player;
     this.GetComponent <SmoothFollow>().enabled = true;
     this.GetComponent <SmoothFollow>().target  = this.player.transform.FindChild("ViewTarget").GetComponent <Transform>();
 }