public void OnMouseExit() { if (!this.isDestination) { OverworldEventManager.Instance().HexTileUnfocused(this); } }
public void OnMouseEnter() { if (IsAdjacentToPlayer() && !this.isDestination) { OverworldEventManager.Instance().HexTileFocused(this); } }
public void Update() { if (Input.GetMouseButtonDown(1)) { if (actor.actionQueue.CurrentAction == null) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit2D hit = Physics2D.GetRayIntersection(ray, Mathf.Infinity, 1 << LayerMask.NameToLayer("Traversable")); if (hit.collider != null) { HexTile tile = hit.collider.gameObject.GetComponent <HexTile>(); OverworldEventManager.Instance().HexTileClicked(tile); } } } }
public void Awake() { offScreenPosition = this.transform.position; OverworldEventManager.Instance().onHexTileFocused += MoveToTile; OverworldEventManager.Instance().onHexTileUnfocused += MoveOffScreen; }
public void Awake() { currentlyVisible = new List <HexTile>(); OverworldEventManager.Instance().onArrivedAtTile += UpdateFog; }
public void Awake() { monsterParty = this.GetComponent <MonsterParty>(); OverworldEventManager.Instance().onStartTurn += DetermineBehaviours; }
public void Awake() { OverworldEventManager.Instance().onArrivedAtTile += MoveCameraToPlayer; active = false; }
public void OnDestroy() { OverworldEventManager.Instance().ArrivedAtTile(destination); }