blob: 9f49d294bec42d8472ce03cb2b2dcd45fb040697 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
extends Entity
class_name Monster
enum MonsterActionType {IDLE, ATTACK, MOVE}
export(int) var damage = 1
onready var sprite = $Sprite3D
func _ready():
add_to_group("monsters")
func try_moving(player_pos : Vector2, monster_pos : Vector2) -> MonsterAction:
return MonsterAction.new()
func cor_attack(args : Array):
yield()
class MonsterAction:
var type : int
var dir : Vector2
func _init():
type = MonsterActionType.IDLE
dir = Vector2(0,0)
|