Пример #1
0
        public CharacterStateManager()
        {
            int snapshotCount = 0;

            _posture       = new PostureManager(this);
            snapshotCount += _posture.SnapshotCount();

            _movement      = new MovementManager(this);
            snapshotCount += _movement.SnapshotCount();

            _action        = new ActionManager(this);
            snapshotCount += _action.SnapshotCount();

            _snapshotsCache = new List <FsmSnapshot>(snapshotCount);
            for (int i = 0; i < snapshotCount; i++)
            {
                _snapshotsCache.Add(new FsmSnapshot());
            }
        }
Пример #2
0
        public CharacterStateManager(ICharacterInfoProvider characterInfo)
        {
            AssertUtility.Assert(characterInfo != null);
            int snapshotCount = 0;

            _posture       = new PostureManager(this, characterInfo);
            snapshotCount += _posture.SnapshotCount();

            _movement      = new MovementManager(this, characterInfo);
            snapshotCount += _movement.SnapshotCount();

            _action        = new ActionManager(this, characterInfo);
            snapshotCount += _action.SnapshotCount();

            _snapshotsCache = new List <FsmSnapshot>(snapshotCount);
            for (int i = 0; i < snapshotCount; i++)
            {
                _snapshotsCache.Add(new FsmSnapshot());
            }
        }