public Vector3 spawn(int x, int y, int z) { hex_grid_coord = new HexGridCoord(x, y, z); Vector3 pl = hex_grid_coord.get_planar_coordinate(); update_debug_info(pl, x, y, z); revealed = false; return(pl); }
// Use this for initialization public ActiveUnit(ActiveUnitMarker _active_unit_marker, string _name, HexGridCoord _position, float _ap_increment = 20f) { panel = GameObject.FindGameObjectWithTag("TagTimeline"); name = _name; ap_increment = _ap_increment; active_unit_marker = _active_unit_marker; position = _position; add_timeline_marker(); map_marker = active_unit_marker.visualize(position); }
bool is_currently_active() { conditional_load_tactical_hud(); HexGridCoord active_unit_position = tactical_hud.get_active_unit_position(); if (active_unit_position != null) { return(hex_grid_coord.equals(active_unit_position)); } return(false); }
public GameObject visualize(HexGridCoord position) { conditionally_load_map(); GameObject parent = map.get_at_abc(position); GameObject prefab_unit = (GameObject)Instantiate(Resources.Load("UnitRep")); prefab_unit.transform.SetParent(parent.transform); prefab_unit.transform.localPosition = new Vector3(0, 0, -0.5f); return(prefab_unit); }
bool has_adjacency_to_active_unit_tile() { conditional_load_tactical_hud(); HexGridCoord active_unit_position = tactical_hud.get_active_unit_position(); if (active_unit_position != null) { foreach (HexGridCoord grid in active_unit_position.get_adjacent_grids()) { if (grid.equals(hex_grid_coord)) { return(true); } } } return(false); }
public GameObject get_at_abc(HexGridCoord hxc) { return(get_at_abc(hxc.a, hxc.b, hxc.c)); }
public bool equals(HexGridCoord other) { return(other.a == a && other.b == b && other.c == c); }