예제 #1
0
 private AttackTurnAction(
     Character attacker,
     Character attackee,
     ICharacterViewResolver characterViewResolver,
     TickableManager tickableManager)
 {
     this.attacker        = attacker;
     this.attackee        = attackee;
     this.attackerView    = characterViewResolver.Resolve(attacker);
     this.attackeeView    = characterViewResolver.Resolve(attackee);
     this.tickableManager = tickableManager;
 }
예제 #2
0
        private MoveTurnAction(
            Character character,
            [InjectOptional] Direction direction,
            [InjectOptional] Position targetPosition,
            ICharacterViewResolver characterViewResolver,
            IPositionScreenPointMapper positionVerctor2Mapper,
            RearrangeViewsSignal rearrangeViewsSignal)
        {
            this.character              = character;
            this.characterView          = characterViewResolver.Resolve(character);
            this.positionVerctor2Mapper = positionVerctor2Mapper;
            this.rearrangeViewsSignal   = rearrangeViewsSignal;

            if (targetPosition != null)
            {
                this.targetPosition = targetPosition;
                this.direction      = character.Position.GetDirectionTo(targetPosition);
            }
            else
            {
                this.direction      = direction;
                this.targetPosition = character.Position.Offset(direction);
            }
        }