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

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

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