diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2023-03-14 21:45:00 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2023-03-14 21:45:00 +0100 |
commit | c2a17228c19c4f959367b139e39c5e24dd7edd36 (patch) | |
tree | 2a898121b636f621bca67e332d439fc7c2e1c0fb /demo/Map.gd | |
parent | d7ae050e7dc27fa052a9f4dbf065fdb86a966967 (diff) | |
download | godot-hexgrid-c2a17228c19c4f959367b139e39c5e24dd7edd36.zip godot-hexgrid-c2a17228c19c4f959367b139e39c5e24dd7edd36.tar.gz |
go godot4
Diffstat (limited to 'demo/Map.gd')
-rw-r--r-- | demo/Map.gd | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/demo/Map.gd b/demo/Map.gd index ca2a927..a72eb40 100644 --- a/demo/Map.gd +++ b/demo/Map.gd @@ -1,4 +1,4 @@ -extends Sprite +extends Sprite2D signal hex_touched(pos, hex, key) @@ -14,7 +14,7 @@ const TREE : String = "res://demo/assets/tree.png" const CITY : String = "res://demo/assets/city.png" const MOUNT : String = "res://demo/assets/mountain.png" -var drag : Sprite +var drag : Sprite2D var board : HexMap var prev : Vector2 @@ -75,10 +75,10 @@ func configure() -> void: v0 -= ts / 2 if v: hex_rotation = 30 - board = HexMap.new(10, 4, 100, v0, false, funcref(self, "get_tile")) + board = HexMap.new(10, 4, 100, v0, false, get_tile) else: hex_rotation = 0 - board = HexMap.new(10, 7, 100, v0, true, funcref(self, "get_tile")) + board = HexMap.new(10, 7, 100, v0, true, get_tile) func texture_size() -> Vector2: return texture.get_size() |