Exemple #1
0
 public void OnMouseExit()
 {
     if (!this.isDestination)
     {
         OverworldEventManager.Instance().HexTileUnfocused(this);
     }
 }
Exemple #2
0
 public void OnMouseEnter()
 {
     if (IsAdjacentToPlayer() && !this.isDestination)
     {
         OverworldEventManager.Instance().HexTileFocused(this);
     }
 }
Exemple #3
0
        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;
 }
Exemple #5
0
 public void Awake()
 {
     currentlyVisible = new List <HexTile>();
     OverworldEventManager.Instance().onArrivedAtTile += UpdateFog;
 }
Exemple #6
0
 public void Awake()
 {
     monsterParty = this.GetComponent <MonsterParty>();
     OverworldEventManager.Instance().onStartTurn += DetermineBehaviours;
 }
Exemple #7
0
 public void Awake()
 {
     OverworldEventManager.Instance().onArrivedAtTile += MoveCameraToPlayer;
     active = false;
 }
Exemple #8
0
 public void OnDestroy()
 {
     OverworldEventManager.Instance().ArrivedAtTile(destination);
 }