Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Utility] and [New Bullet] weight system and better simulation of knockback #476

Closed
wants to merge 21 commits into from

Conversation

cylic14790382
Copy link

In this pull request, I might finish issue #421 and issue #239 .

首先,原有的队列正如 PR #435 中提到的那样, 对于位置的更新存在一点问题。
于是,在他的启发下更改了更新的逻辑:
所有的类似于PushEventMoveUnit的函数都在队列中只更改Unit::position_change_
最后所有的更改收集在EndTick函数中一并更新。(和本PR相关的仅仅是位移方向,所以伤害方向并没有更改)。
其次,实现了一个简单的Effect效果:通过增加一个队列AwaitingQueue来实现。
同时,位移雪球以前实现的其实类似于瞬移,通过上述实现将其真正模拟成位移:相当于一段时长的位移buff。
见下

Snowball.mp4
badsnowball.mp4

@cylic14790382
Copy link
Author

关于重力系统的更新,仅仅添加一个Unit类中的参数weight,通过调用可以得到推离应该有的距离,
目前附加的buff永远是50个tick,距离是11/(0.1+weight), weight 初始是1。

@cylic14790382
Copy link
Author

cylic14790382 commented Jan 16, 2023

关于新的坦克类型,主要实现了技能反重力期间所有非自身单位重力减半,速度加倍,并向四周发射击退子弹(可能有点不平衡[doge])

Sample.mp4

敌方单位是infernotank,weight是20,子弹是snowball,可以看到开启技能后明显能打动了(但是还是被吊打[doge])

Copy link

@qinchuanhui qinchuanhui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,you can get the corresponding score

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants