ld-39-jam/EnemyGrunt.gd

18 lines
345 B
GDScript3
Raw Normal View History

2017-07-30 20:57:41 +01:00
extends KinematicBody2D
2017-07-31 17:23:46 +01:00
var grunt_rot_speed = deg2rad(22.5) # degrees per second
2017-08-01 22:28:11 +01:00
var current_target = null
2017-07-31 17:23:46 +01:00
2017-07-30 20:57:41 +01:00
func _ready():
var t = get_tree()
var r = t.get_root()
var n = r.get_node("Game/MinimapControl")
n.register_entity(self)
2017-07-31 17:23:46 +01:00
set_process(true)
2017-07-30 20:57:41 +01:00
func type():
return "EnemyGrunt"
2017-07-31 17:23:46 +01:00
func _process(delta):
rotate(grunt_rot_speed * delta)