// Start is called before the first frame update void Start() { /* * if(true == _isPlayer) * { * _characterModule = _playerModule; * * _stateDic.Add(eState.IDLE, new PlayerIdleState()); * _stateDic.Add(eState.WAIT, new WaitState()); * _stateDic.Add(eState.KICK, new KickState()); * _stateDic.Add(eState.WALK, new WalkState()); * _stateDic.Add(eState.RUN, new RunState()); * _stateDic.Add(eState.SLIDE, new SlideState()); * _stateDic.Add(eState.PATROL, new PatrolState()); * _stateDic.Add(eState.DEATH, new DeathState()); * * } * else * { * _characterModule = _playerModule; * } */ _characterModule = _charModuleList[(int)_charType]; _characterModule.BuildStateList(); for (int i = 0; i < _stateDic.Count; i++) { eState state = (eState)i; _stateDic[state].SetCharacter(this); } ChangeState(eState.IDLE); }
// Start is called before the first frame update void Start() { _characterModule = _charModuleList[(int)_charType]; _characterModule.BuildStateList(); CreateWeapon(); }