Press() public méthode

Press logic sets the current state of the button to "IsPressed" untill the Release() method is called
public Press ( ) : void
Résultat void
 /// <summary>
 /// uGUI Event system stuff
 /// It's also utilised by the editor input helper
 /// </summary>
 /// <param name="eventData">Data of the passed event</param>
 public void OnPointerDown(PointerEventData eventData)
 {
     if (actionButton != null)
     {
         actionButton.gameObject.SetActive(true);
     }
     _virtualButton.Press();
 }
Exemple #2
0
        /// <summary>
        /// uGUI Event system stuff
        /// It's also utilised by the editor input helper
        /// </summary>
        /// <param name="eventData">Data of the passed event</param>

        public void OnPointerDown(PointerEventData eventData)
        {
            Debug.Log("btnDown");


            if (bulletCount < bulletMax && !reloadCheck)
            {
                Bullets [bulletCount].SetActive(true);
                bulletCount++;

                if (bulletCount >= bulletMax)
                {
                    reloadCheck = true;
                    bulletCount = 0;
                    Invoke("reload", reloadTime_in);
                }
            }
            //nv.RPC ("RPCOnPointerDown", RPCMode.AllBuffered, Bullets[0].gameObject);


            _virtualButton.Press();
        }
Exemple #3
0
 /// <summary>
 /// uGUI Event system stuff
 /// It's also utilised by the editor input helper
 /// </summary>
 /// <param name="eventData">Data of the passed event</param>
 public void OnPointerDown(PointerEventData eventData)
 {
     _virtualButton.Press();
 }
Exemple #4
0
 /// <summary>
 /// uGUI Event system stuff
 /// It's also utilised by the editor input helper
 /// </summary>
 /// <param name="eventData">Data of the passed event</param>
 public void OnPointerDown(PointerEventData eventData)
 {
     _virtualButton.Press();
     img.sprite = pressedSprite;
 }
 /// <param name="eventData">Data of the passed event</param>
 public void OnPointerDown(PointerEventData eventData)
 {
     ActiveButton = true;
     DownActive   = true;
     _virtualButton.Press();
 }
Exemple #6
0
 /// <summary>
 /// uGUI Event system stuff
 /// It's also utilised by the editor input helper
 /// </summary>
 /// <param name="eventData">Data of the passed event</param>
 ///
 public void OnPointerDown(PointerEventData eventData)
 {
     gameObject.GetComponent <Image>().color = new Color32(144, 144, 144, 255);
     _virtualButton.Press();
 }
Exemple #7
0
 /// <summary>
 /// uGUI Event system stuff
 /// It's also utilised by the editor input helper
 /// </summary>
 /// <param name="eventData">Data of the passed event</param>
 public void OnPointerDown(PointerEventData eventData)
 {
     _virtualButton.Press();
     Debug.Log("JumpButton");
 }