Exemplo n.º 1
0
 public void OnTouchDown()
 {
     if (UnitClicked != null)
     {
         UnitClicked.Invoke(this, new EventArgs());
     }
 }
Exemplo n.º 2
0
 protected virtual void OnMouseDown()
 {
     if (UnitClicked != null)
     {
         UnitClicked.Invoke(this, new EventArgs());
     }
 }
Exemplo n.º 3
0
 public void UnitAttack()
 {
     if (UnitClicked != null)
     {
         unitAttack = true;
         UnitClicked.Invoke(this, new EventArgs());
     }
 }
Exemplo n.º 4
0
 public void moveUnit()
 {
     if (UnitClicked != null)
     {
         moveOn = true;
         UnitClicked.Invoke(this, new EventArgs());
     }
 }
Exemplo n.º 5
0
 public virtual void OnMouseDown()
 {
     if (PauseMenu.GameIsPaused == false && UnitClicked != null)
     {
         UnitClicked.Invoke(this, new EventArgs());
     }
     ui_operator.cardDisplay.GetComponent <CardDisplay>().card = card;
     //ui_operator.ShowCard();
 }
Exemplo n.º 6
0
 protected virtual void OnMouseDown()
 {
     if (!EventSystem.current.IsPointerOverGameObject())
     {
         if (UnitClicked != null)
         {
             UnitClicked.Invoke(this, new EventArgs());
         }
     }
 }
Exemplo n.º 7
0
 public override void OnTouchUp()
 {
     if (marked)
     {
         if (UnitClicked != null)
         {
             UnitClicked.Invoke(this, new EventArgs());
         }
     }
     base.OnTouchUp();
 }
Exemplo n.º 8
0
    /////////////////////////////////
    //////////UI CUES
    /////////////////////////////////

    protected virtual void OnMouseOver()
    {
        if (Input.GetMouseButtonDown(0) && UnitClicked != null)
        {
            UnitClicked.Invoke(this, new EventArgs());
        }
        if (Input.GetMouseButtonDown(1) && UnitRightClicked != null)
        {
            UnitRightClicked.Invoke(this, new EventArgs());
        }
    }
Exemplo n.º 9
0
 public void OnMouseDown()
 {
     if (Cell.isWithinAbilityRange)
     {
         abilityTarget = this;
     }
     if (UnitClicked != null)
     {
         UnitClicked.Invoke(this, new EventArgs());
     }
 }
Exemplo n.º 10
0
    protected virtual void OnMouseDown()
    {
        int asdf = GameObject.Find("CellGrid").GetComponent <CellGrid>().CurrentPlayerNumber;

        if (!(this is Building) && !IsOwnedByMe() && DarkRift.DarkRiftAPI.isConnected && DarkRift.DarkRiftAPI.id - 1 != PlayerNumber &&
            DarkRift.DarkRiftAPI.id - 1 != GameObject.Find("CellGrid").GetComponent <CellGrid>().CurrentPlayerNumber)
        {
            simpleAmusement += 0.1f;
        }
        if (UnitClicked != null /*&& NetManager.playerNumber-1 == PlayerNumber*/)
        {
            UnitClicked.Invoke(this, new EventArgs());
        }
    }
Exemplo n.º 11
0
    public virtual void OnMouseDown()
    {
        if (UnitClicked != null)
        {
            GameObject menuManager = GameObject.Find("BattleMenuCanvas");
            if (menuManager != null)
            {
                GameObject cellGrid = GameObject.Find("CellGrid");
                if (cellGrid != null)
                {
                    if (cellGrid.GetComponent <CellGrid> ().CurrentPlayerNumber == this.PlayerNumber)
                    {
                        menuManager.GetComponent <battleMenuManager> ().unitSelected = this.gameObject;
                    }
                    if (cellGrid.GetComponent <CellGrid> ().CurrentPlayerNumber != this.PlayerNumber)
                    {
                        menuManager.GetComponent <battleMenuManager> ().unitClicked = this.gameObject;
                    }
                }
            }

            UnitClicked.Invoke(this, new EventArgs());
        }
    }
Exemplo n.º 12
0
 protected virtual void OnMouseDown()
 {
     UnitClicked?.Invoke(this);
 }
Exemplo n.º 13
0
 protected virtual void OnMouseDown()
 {
     UnitClicked?.Invoke(this, new EventArgs());
 }