Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / activity / shell / Shell.cs
@lijincheng lijincheng on 7 Jun 2023 402 bytes 初始化武器数据
  1.  
  2. using Godot;
  3.  
  4. /// <summary>
  5. /// 弹壳类
  6. /// </summary>
  7. [Tool, GlobalClass]
  8. public partial class Shell : ActivityObject
  9. {
  10. public override void OnInit()
  11. {
  12. base.OnInit();
  13. ShadowOffset = new Vector2(0, 1);
  14. ThrowCollisionSize = new Vector2(5, 5);
  15. }
  16.  
  17. protected override void OnThrowOver()
  18. {
  19. EnableBehavior = false;
  20. Collision.QueueFree();
  21. }
  22. }