public PlayerPres(IPlayerView view) : base(ENTITY_TYPE.PLAYER) { _character = CharacterModel.Create(Type, Id); _character.MoveSpeed = 100; var collState = InteractStateModel.Create(Type, Id); var interactController = new InteractController(collState.obj); _view = view; _view.interactController = interactController; _character.Position = _view.Position; _view.Subscribe(OnViewChanged); _animState = AnimStateModel.Create(Type, Id); _animController = _view.CreateAnimController(_animState.obj); AddAnimation(Const.ANIMATION.IDLE, "Standing Idle"); AddAnimation(Const.ANIMATION.WALK_FW, "Standing Walk Forward"); AddAnimation(Const.ANIMATION.WALK_BW, "Standing Walk Back"); AddAnimation(Const.ANIMATION.WALK_LEFT, "Standing Walk Left"); AddAnimation(Const.ANIMATION.WALK_RIGHT, "Standing Walk Right"); AddAnimation(Const.ANIMATION.RUN_FW, "Standing Run Forward"); AddAnimation(Const.ANIMATION.RUN_BW, "Standing Run Back"); AddAnimation(Const.ANIMATION.RUN_LEFT, "Standing Run Left"); AddAnimation(Const.ANIMATION.RUN_RIGHT, "Standing Run Right"); AddAnimation(Const.ANIMATION.ATTACK_FIREBALL_BIG, "Standing 1H Magic Attack 01"); AddAnimation(Const.ANIMATION.ATTACK_FIREBALL_SMALL, "Standing 2H Magic Attack 01"); AddAnimation(Const.ANIMATION.ATTACK_SPELL_GROUND, "Standing 2H Cast Spell 01"); _fsm = new PlayerFSM(this, _animState.obj, _character.obj); }
public StateAttack(string name, PlayerFSM fsm, int priotity) { Name = name; _fsm = fsm; Priority = priotity; _character = new CharacterModel(_fsm.charObj); }
public StateIdle(string name, PlayerFSM fsm, int priotity) { Name = name; _fsm = fsm; Priority = priotity; }