Ejemplo n.º 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());
        }
Ejemplo n.º 2
0
        public static void PlayerDestroyed()
        {
            EventManager.player  = null;
            onPlayerInvulnerable = null;

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

            if (onPlayerSpawned != null)
            {
                onPlayerSpawned(player);
            }
        }
Ejemplo n.º 4
0
 public void OnPlayerDestroyed()
 {
     this.player = null;
 }
Ejemplo n.º 5
0
 public void OnPlayerSpawned(TrackSpectator player)
 {
     this.player = player;
     this.player.TrackGenerator = this;
 }
Ejemplo n.º 6
0
 public void OnPlayerSpawned(TrackSpectator player)
 {
     this.GetComponent <TransformConstraint>().target = player.transform;
 }
Ejemplo n.º 7
0
 public void OnPlayerSpawned(TrackSpectator player)
 {
     this.player         = player;
     this.shipController = this.player.GetComponent <ShipController>();
 }
Ejemplo n.º 8
0
 public void OnPlayerDestroyed()
 {
     this.player = null;
     this.GetComponent <SmoothFollow>().enabled = false;
     this.GetComponent <SmoothFollow>().target  = null;
 }
Ejemplo n.º 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>();
 }