Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / item / weapon / shell / ShellCase.cs
@小李xl 小李xl on 10 May 2023 487 bytes 添加敌人死亡特效
  1.  
  2. using Godot;
  3.  
  4. /// <summary>
  5. /// 弹壳类
  6. /// </summary>
  7. [RegisterActivity(ActivityIdPrefix.Shell + "0001", ResourcePath.prefab_weapon_shell_ShellCase_tscn)]
  8. public partial class ShellCase : 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. }