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

feat: 添加动态改变颜色的功能 #84

Merged
merged 7 commits into from
Sep 23, 2024

Conversation

cutekibry
Copy link
Collaborator

现在当卡牌放置时,若卡牌非法,就会自动让卡牌变红,而不是等到全部放完才变红。

可将一些常用的函数(如 max_by 等)写入 Utils,方便复用。
- 添加 get_smile_inds() 函数,用于获取表达式中笑脸位置
- 将 check_valid() 改为 check_invalid(),并返回所有非法下标列表,
  而不是仅返回部分
- 将 check() 改为 @deprecated
ShakeComponent 可对 ShakeComponent.attach_node: Node 的 position
应用抖动效果。

默认 attach_node = null,在 _ready 时设置 attach_node 为父节点。

ShakeComponent.shake(amount: float, duration: float) 可
令其抖动 duration 秒,幅度为 amount。

可通过 ShakeComponent.shake_type 设置抖动类型。
- 将震动逻辑独立到 ShakeComponent 中,交由其处理
- 当设置非法符号 / 金色符号时,可使用 set_is_invalid / set_is_golden
  方法
现在当卡牌放置时,若卡牌非法,就会自动让卡牌变红,而不是等到全部放完
才变红。
@cutekibry cutekibry merged commit beceb8e into main Sep 23, 2024
4 checks passed
@cutekibry cutekibry deleted the feat-20240923-dynamically-change-color branch September 24, 2024 10:06
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.

1 participant