EPlace.gd 374 B

123456789101112131415161718192021222324252627
  1. extends Label3D
  2. class_name EPlace
  3. var stay = 0
  4. export var size = 0.05
  5. var col = Color8(40,180,200)
  6. func _init():
  7. text = "e"
  8. color = col
  9. power = 3
  10. rotspeed = 6
  11. func _ready():
  12. scale=Vector3(1,1,1)*size
  13. func _process(delta):
  14. if visible:
  15. stay-=1
  16. if stay<=0 :
  17. stay=0
  18. visible = false
  19. elif stay>4 :
  20. stay=4
  21. rotation_degrees+=Vector3(0.0,rotspeed,0.0)