New items + base typing + price generation + new menu template
This commit is contained in:
parent
ff19560f0b
commit
50be4a0bb2
20 changed files with 408 additions and 37 deletions
23
scripts/misc/BaseMenuOpen.gd
Normal file
23
scripts/misc/BaseMenuOpen.gd
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
extends Area2D
|
||||
|
||||
@export var menu : PackedScene
|
||||
@onready var base_collider = $"../BaseCollider/BaseColliderDetector"
|
||||
var menu_inst
|
||||
|
||||
func onbcbodyentered(body):
|
||||
if body is MainShip:
|
||||
body.engine.speed = 0
|
||||
|
||||
|
||||
func _on_body_entered(body):
|
||||
if body is MainShip:
|
||||
body.allow_shooting = false
|
||||
menu_inst = menu.instantiate()
|
||||
body.find_child("GUI").add_child(menu_inst)
|
||||
menu_inst.modulate = get_parent().modulate
|
||||
menu_inst.base = get_parent()
|
||||
|
||||
func _on_body_exited(body):
|
||||
if body is MainShip:
|
||||
body.allow_shooting = true
|
||||
menu_inst.queue_free()
|
||||
Loading…
Add table
Add a link
Reference in a new issue