Beispiel #1
0
        public Turn(ArrayList characters, 
            Heroes.Core.Battle.Characters.Hero attackHero, Heroes.Core.Battle.Characters.Hero defendHero)
        {
            _characters = characters;

            if (_characters.Count > 0)
            {
                _currentCharacter = (StandardCharacter)_characters[0];
                _currentCharacter._isBeginTurn = true;
                //_currentCharacter._action = _currentCharacter.CreateStandingAction(_currentCharacter, _currentCharacter.CurrentFacingDirection, _currentCharacter._isBeginTurn);
                //_currentCharacter.SetAnimation(_currentCharacter._action._currentAnimationSeq);
            }
            else
                _currentCharacter = null;

            _attackHero = attackHero;
            _defendHero = defendHero;
        }
Beispiel #2
0
        public Action CreateStandingAction(Hero character, HorizontalDirectionEnum facing)
        {
            Action action = new Action(ActionTypeEnum.Standing);

            Animation animation = null;
            if (facing == HorizontalDirectionEnum.Right)
            {
                if (this._sex == SexEnum.Male)
                    animation = this._animations._standingRightMale;
                else
                    animation = this._animations._standingRightFemale;
            }
            else
            {
                if (this._sex == SexEnum.Male)
                    animation = this._animations._standingLeftMale;
                else
                    animation = this._animations._standingLeftFemale;
            }

            AnimationSequence seq = new AnimationSequence(animation, AnimationPurposeEnum.StandingStill, facing);
            action._animationSeqs.Add(seq);
            action._currentAnimationSeq = seq;

            return action;
        }