Ejemplo n.º 1
0
    public async Task SpinCommand(CommandContext context)
    {
        Animation anim   = new Animation(5);
        Keyframe  frame1 = new Keyframe(1.5f);
        Keyframe  frame2 = new Keyframe(1.5f);

        frame1.AddElement(new Emote(":DOOD:"));
        frame2.AddElement(new Emote(":DOOD2"));

        anim.AddKeyframe(frame1);
        anim.AddKeyframe(frame2);

        DiscordMessage message = await context.Message.RespondAsync(anim.StartAnimation());

        await anim.PlayAnimation(message);
    }
Ejemplo n.º 2
0
    public async Task BulletsCommand(CommandContext context)
    {
        Animation anim   = new Animation(3);
        Keyframe  frame1 = new Keyframe(1.5f);
        Keyframe  frame2 = new Keyframe(1.5f);
        Keyframe  frame3 = new Keyframe(1.5f);
        Keyframe  frame4 = new Keyframe(1.5f);
        Keyframe  frame5 = new Keyframe(1.5f);

        frame1.AddElement(new Emote(0, 1, ":DOOD:"));
        frame1.AddElement(new Emote(38.25f, 1, ":gun:"));
        frame1.AddElement(new Emote(0, 3, ":Kuuhaku"));

        frame2.AddElement(new Emote(0, 0, ":DOOD:"));
        frame2.AddElement(new Emote(30, 1, ":boom:"));
        frame2.AddElement(new Emote(38.25f, 1, ":gun:"));
        frame2.AddElement(new Emote(0, 3, ":Kuuhaku"));

        frame3.AddElement(new Emote(0, 2, ":DOOD:"));
        frame3.AddElement(new Emote(30, 0, ":boom:"));
        frame3.AddElement(new Emote(38.25f, 0, ":gun:"));
        frame3.AddElement(new Emote(0, 3, ":Kuuhaku"));

        frame4.AddElement(new Emote(0, 0, ":DOOD:"));
        frame4.AddElement(new Emote(30, 2, ":boom:"));
        frame4.AddElement(new Emote(38.25f, 2, ":gun:"));
        frame4.AddElement(new Emote(0, 3, ":Kuuhaku"));

        frame5.AddElement(new Emote(0, 2, ":DOOD:"));
        frame5.AddElement(new Emote(30, 0, ":boom:"));
        frame5.AddElement(new Emote(38.25f, 0, ":gun:"));
        frame5.AddElement(new Emote(0, 3, ":Kuuhaku"));

        anim.AddKeyframe(frame1);
        anim.AddKeyframe(frame2);
        anim.AddKeyframe(frame3);
        anim.AddKeyframe(frame4);

        DiscordMessage message = await context.Message.RespondAsync(anim.StartAnimation());

        await anim.PlayAnimation(message);
    }