void RemovePlayer( TennisInputHandler player ) { spawnPoints.Insert( 0, player.transform.position ); //players.Remove( player ); player.device = null; Destroy( player.gameObject ); }
// Use this for initialization void Start() { sound = GetComponent<AudioSource>(); cam = Camera.main.GetComponent<OverheadCameraController>(); rend = GetComponent<Renderer>(); anim = GetComponent <Animator>(); equipmentCollider = equipment.GetComponent<CapsuleCollider>(); input = GetComponent<TennisInputHandler>(); input.control = this; rb = GetComponent<Rigidbody>(); rend.material.color = c1; alive = true; anim.SetBool("Alive", true); impactMod = 7.5f; respawnPoints = GameObject.FindGameObjectsWithTag("RespawnPoint"); equipmentCollider.enabled = false; if (respawnPoints.Length == 0) { Debug.Log("There aren't any respawn points, you catastrophic dingus."); } respawnPointsTeamA = GameObject.FindGameObjectsWithTag ("RespawnPointTeamA"); respawnPointsTeamB = GameObject.FindGameObjectsWithTag ("RespawnPointTeamB"); paint = GetComponent<PaintSplatter>(); // paint.color = c1; hitForce = 25; }