main
Yogi 2024-01-29 18:25:46 +08:00
parent 57b8810c61
commit ef5fea8dca
1 changed files with 5 additions and 2 deletions

View File

@ -1,8 +1,11 @@
[GDScript reference — Godot Engine (stable) documentation in English](https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html)
### 组合与继承
- extends 关键字就是继承的方式
- 子脚本中调用 super. 就是调用父类 类似C#中的parent.
- 子类方法与父类方法同名时, 会重写方法,
- 一般都会写一个空的方法作为 abstruct 方法
- 如果想搞一个 virtual 方法, 那么就在子类重写方法后, 调用super.原方法实现
### 用键盘代替鼠标来进行游戏操作Vimlike
- 关键点Control.focus