我是否为C#连接4游戏中的计数器制作动画? [英] Ow do I make an animation for a counter dropping down the board in C# for connect 4 game?

查看:95
本文介绍了我是否为C#连接4游戏中的计数器制作动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我的学校项目是用c#进行连接4游戏。我目前刚刚完成制作电路板并且想知道我现在让它在拖动到一个电路板插槽的顶部时降落到底部吗?



董事会代码



我的尝试:



我已经尝试过使用if语句和数组,如果板中的方块为空,那么向下移动一个方格但我不知道我将如何编码

Hi so for my school project i am making a connect 4 game in c#. I ave currently just finished making the board and was wondering ow do i now make the counter drop to the bottom when it is dragged and dropped into the top of one of the board slots?

Board code

What I have tried:

i've tried thinking of using if statements and arrays so tat if the square in the board is empty then move down one square but i don't know how i would code this

推荐答案

您可以通过在不同位置依次显示对象来移动窗口或窗体中的对象,使用某种形式的计时器使转换变慢或变快。请参阅 c - Google搜索 [ ^ ]。
You move objects in a Window or Form by displaying them sequentially at different positions, using some form of timer to make the transition slow or fast. See c - Google Search[^].


这篇关于我是否为C#连接4游戏中的计数器制作动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆