Esempio n. 1
0
 public TargetSelection(BattleContext context, Player doer, BattleToken token, Skill skill)
 {
     this.context = context;
     this.doer    = doer;
     this.token   = token;
     this.skill   = skill;
 }
        private void ShowToken(Random random, BattleToken token, Object2D parent, int index)
        {
            var tokenObj = new BattleTokenView(token);

            Tokens[token.Index] = tokenObj;
            Layer.AddObject(tokenObj);

            var x = (float)random.NextDouble() * 2 - 1;
            var y = (float)random.NextDouble() * 2 - 1;

            tokenObj.Position = coordinateConverter.Convert(new Vector2DF(x, y));

            var profileObj = new ProfileCardView(token, headerFont, planeFont);

            Profiles[token.Index] = profileObj;
            parent.AddChild(profileObj, ChildManagementMode.Disposal | ChildManagementMode.RegistrationToLayer,
                            ChildTransformingMode.All);

            var sizeX = 160.0f;
            var px    = (index % 2) * (sizeX + 4);
            var py    = (index / 2) * (sizeX * 1.61805f + 4);

            profileObj.Position = new Vector2DF(-px, -py) - new Vector2DF(sizeX, sizeX * 1.61805f);

            var scale = sizeX / profileObj.CardSize.X;

            profileObj.Scale = new Vector2DF(scale, scale);
        }
Esempio n. 3
0
        public async Task <ActionSelection> DetermineNextStepAsync()
        {
            BattleToken token = await context.View.InputTokenAsync(context, doer);

            Console.WriteLine($"{token.Property.Name}が選択されました");
            return(new ActionSelection(context, doer, token));
        }
 internal SkillInvocation(BattleContext context, Player doer, BattleToken token, Skill skill, ISkillTarget target)
 {
     this.context = context;
     this.doer    = doer;
     this.token   = token;
     this.skill   = skill;
     this.target  = target;
 }
 public MoveBattlePrimitive(BattleToken token, Vector2 distance)
 {
     this.token    = token;
     this.distance = distance;
 }
 public Task ShowMove(BattleToken token, Vector2 distance)
 {
     throw new NotImplementedException();
 }
 public Task <ISkillTarget> InputTargetAsync(BattleContext context, Player doer, BattleToken token, Skill skill)
 {
     throw new NotImplementedException();
 }
 public Task <Skill> InputActionAsync(BattleContext context, Player player, BattleToken token)
 {
     throw new NotImplementedException();
 }
 public Task EnsureSelfTarget(BattleToken token)
 {
     throw new NotImplementedException();
 }
Esempio n. 10
0
 public ActionSelection(BattleContext context, Player player, BattleToken token)
 {
     this.context = context;
     this.player  = player;
     this.token   = token;
 }
Esempio n. 11
0
        public async Task <ISkillTarget> InputTargetAsync(BattleContext context, Player doer, BattleToken token)
        {
            await context.View.EnsureSelfTarget(token);

            return(new SelfSkillTarget());
        }