/*void DoInteract(RaycastHit hit, int index) * { * Item t = hit.collider.GetComponent<Item>(); * InteractWithItem(t, index); * }*/ void DoMove(RaycastHit hit) { //Debug.Log("DoMove(" + hit + ") called"); TileStatus t = hit.collider.GetComponent <TileStatus>(); if ((t.IsPath() && GetPlayerStatusScript().IsShowingPath()) || (t.IsSelectable() && !GetPlayerStatusScript().IsShowingPath())) { MoveToTile(t.GetComponent <TileBFSScript>()); } }
//private TileBFSScript pathDestination; public void CheckHighlightPath(/*RaycastHit hit*/) { TileStatus t = this.GetComponent <TileStatus>(); if (t.IsSelectable()) { TurnManager.GetCurrentPlayer().GetComponent <PlayerActionScript>().SetPathDestination(t.GetComponent <TileBFSScript>()); //pathDestination = t.GetComponent<TileBFSScript>(); HighlightPathTo(t); } }