private void Start() { base.Initialized(); m_sceneCharactersManager.AddPlayerToCharaterList(this.gameObject, CharacterType.Player); m_InputKeyManager = GetComponent <InputKeyManager>(); GunClass[] guns = GetComponentsInChildren <GunClass>(); m_Guns = new List <GunClass>(); for (int i = 0; i < guns.Length; i++) { m_Guns.Add(guns[i]); } m_currentlyActiveGun = m_Guns[0]; if (m_MainCameraTransform == null) { m_MainCameraTransform = Camera.main.transform; } m_simpleLocomotionState = new PlayerSimpleLocomotionState(this, m_animator); m_gunFireState = new PlayerGunFiringState(this, m_animator); if (m_typeOfCameraMovement == CameraMovementType.FreeLook) { OnStateChanged(m_simpleLocomotionState); } else { OnStateChanged(m_gunFireState); } }
public void Start() { _player = player.GetInstance(); _playerState = player.GetInstance().curState; Mgr = InputKeyManager.GetInstance(); }
private void Awake() { instance = this; }
private void Start() { m_playerManager = GetComponent <PlayerManager>(); m_inputKeyManager = GetComponent <InputKeyManager>(); }