コード例 #1
0
        public async Task <PhaseResult <string> > DoSkillSelectionAsync(SkillSelectionPhase phase, IBattlePhases handler)
        {
            Console.Write($"アクター{phase.ActorId}の行動 >");
            var input = Console.ReadLine();

            if (input == "cancel" || input == null)
            {
                return(new Cancelled <string>());
            }

            return(await handler.TargetSelection(phase, int.Parse(input)));
        }
コード例 #2
0
        public async Task <PhaseResult <string> > SkillSelection(int actorId)
        {
            var __phase = new SkillSelectionPhase(actorId);

            return(await HandlePhaseFlowAsync(() => _logic.DoSkillSelectionAsync(__phase, this)));
        }
コード例 #3
0
        public async Task <PhaseResult <string> > TargetSelection(SkillSelectionPhase phase, int skillId)
        {
            var __phase = new TargetSelectionPhase(phase, skillId);

            return(await HandlePhaseFlowAsync(() => _logic.DoTargetSelectionAsync(__phase, this)));
        }
コード例 #4
0
 public TargetSelectionPhase(SkillSelectionPhase phase, int skillId)
 {
     Phase   = phase;
     SkillId = skillId;
 }