// Use this for initialization void Start() { //sound = GetComponent<AudioSource>(); cam = Camera.main.GetComponent<FencingCameraController>(); rend = GetComponent<Renderer>(); rb = GetComponent<Rigidbody>(); anim = GetComponent <Animator>(); equipScript = GetComponentInChildren<FencingEquipment>(); //deathScript = transform.GetComponentInChildren<ConfettiScript>(); shield = GetComponent<SphereCollider>(); shield.enabled = false; input = GetComponent<FencingInputHandler>(); input.rb = rb; input.control = this; input.player = gameObject; alive = true; Armed = true; rend.material.color = color; equipScript.owner = this.gameObject; equipScript.ResetColor(color); movementAllowed = true; ResetRigidBodyConstraints(); }
// Use this for initialization void Start() { if (layla == null) { layla = GameObject.Find("Layla"); } finished = false; liaison = layla.GetComponent<GameControlLiaison>(); players = new Player[liaison.numberOfActivePlayers]; for (int p = 0; p < players.Length; p++) { players[p] = liaison.players[p]; } respawnPointPositions = new Vector3[respawnPoints.Length]; for (int i = 0; i < respawnPoints.Length; i++) { respawnPointPositions[i] = respawnPoints[i].transform.position; } //players = liaison.players; ResetExistingPlayers(); camScript = Camera.main.GetComponent<FencingCameraController>(); SetPlayers(); roundWinTime = -1; victoryDuration = 3; gameDuration = 60; gameStartTime = Time.time; UpdateStatCards(); inGame.GetComponent<InGamePlayerBoard>().SetPlayers = players; }