internal void Awake() { playerOneSmokeController = GameObject.FindGameObjectWithTag("PlayerOne").GetComponent <SmokebombController>(); playerTwoSmokeController = null; GameObject playerTwo = GameObject.FindGameObjectWithTag("PlayerTwo"); if (playerTwo != null) { playerTwoSmokeController = playerTwo.GetComponent <SmokebombController>(); } }
private void Awake() { fpsMove = GetComponent <FirstPersonMovement>(); cameraTransform = GetComponentInChildren <Camera>().transform; airconLayer = LayerMask.NameToLayer("AirconSwitch"); doorLayer = LayerMask.NameToLayer("Door"); elevatorActivateLayer = LayerMask.NameToLayer("ElevatorActivate"); elevatorSlowActivateLayer = LayerMask.NameToLayer("ElevatorSlowTerminal"); interactLayer = 1 << airconLayer | 1 << doorLayer | 1 << elevatorActivateLayer | 1 << elevatorSlowActivateLayer; elevatorTerminal = GameObject.FindGameObjectWithTag("ElevatorTerminal"); smokeBombController = GetComponent <SmokebombController>(); }