initial commit
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
extends Spatial
|
||||
|
||||
var _game_manager
|
||||
|
||||
func _ready():
|
||||
_game_manager = get_node("/root/Game_manager")
|
||||
|
||||
func left_click_on_hex(hex_node):
|
||||
if _game_manager.is_my_turn():
|
||||
|
||||
if _game_manager.ability_left():
|
||||
|
||||
if hex_node.is_free():
|
||||
|
||||
if _game_manager.get_previous_hex() != null:
|
||||
print("try to occupy")
|
||||
|
||||
if hex_node in _game_manager.get_previous_hex().get_neighbours():
|
||||
print("Yea")
|
||||
_game_manager.try_to_occupy_hex(hex_node)
|
||||
else:
|
||||
_game_manager.try_to_occupy_hex(hex_node)
|
||||
|
||||
func right_click_on_hex(hex_node):
|
||||
print("Right click")
|
Reference in New Issue
Block a user