예제 #1
0
파일: Turn.cs 프로젝트: sakseichek/homm
        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;
        }
예제 #2
0
파일: Hero.cs 프로젝트: sakseichek/homm
        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;
        }