Exemplo n.º 1
0
 public static void OnLeftClicked(LeftClickEventArgs e)
 {
     if (LeftClickHandler != null)
     {
         LeftClickHandler(null, e);
     }
 }
 public void OnLeftClick(object sender, LeftClickEventArgs e)
 {
     if (e.PressedNode.ResidingEntity != null)
     {
         if (e.PressedNode.ResidingEntity.EntityIndex == EntityIndex)
         {
             if (e.PressedNode.ResidingEntity.EntityUniqueId == EntityUniqueId)
             {
                 _isSelected = true;
                 EntityBuilder.SelectedEntity = this;
                 EntityBuilder.SpawnPointGameObject.SetActive(false);
                 ViewManager.GetInstance().SwitchToUnitView();
                 ViewManager.GetInstance().ShowcaseSoldierInformation(this, this);
             }
             else
             {
                 _isSelected = false;
             }
         }
         else
         {
             _isSelected = false;
         }
     }
     else
     {
         _isSelected = false;
     }
 }
Exemplo n.º 3
0
    public void OnClick(object sender, EventArgs eventArgs)
    {
        LeftClickEventArgs leftClickEventArgs = (LeftClickEventArgs)eventArgs;

        if (leftClickEventArgs.ClickedObject == this.transform)
        {
            mainSceneManager.ChangeStage(nextOrLast);
        }
    }