private void Awake() { _camera = GetComponent <C_Camera>(); _animator = GetComponent <C_Animator>(); _velocity = GetComponent <C_Velocity>(); _stateMgr = GetComponent <CS_StateMgr>(); _attributes = GetComponent <C_Attributes>(); _iKManager = GetComponent <C_IKManager>(); _audioSource = GetComponent <AudioSource>(); _characterController = GetComponent <CharacterController>(); }
public override void Init(GameObject obj) { _animator = obj.GetComponent <C_Animator>(); _uiMgr = obj.GetComponent <C_UiEventMgr>(); _velocity = obj.GetComponent <C_Velocity>(); _iKManager = obj.GetComponent <C_IKManager>(); _weaponHandle = obj.GetComponent <C_WeaponHandle>(); _stateMgr = obj.GetComponent <CS_StateMgr>(); _photonView = obj.GetComponent <PhotonView>(); _ownAnimator = GetComponent <Animator>(); _audioSource = GetComponent <AudioSource>(); _weaponAttribute = GetComponent <WeaponAttribute>(); timer = new Timer(); }
void ListenerPeocess(CS_StateMgr _stateMgr) { foreach (AvatarState state in _stateMgr.avatarStates.Values) { if (!state._active) { if (state.Listener()) { // exit last state var lastState = _stateMgr.avatarStates[_stateMgr.runningState]; lastState.Exit(); _stateMgr.runningState = state._name; state.Enter(); break; } } } }