Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tora

Pages: [1]
1
NGUI 3 Support / Re: OnDragOut() simulating what stickyPress used to do/
« on: January 18, 2015, 03:48:44 AM »
Thank you, I did not see that. The solution was right in my face...  :-[

2
NGUI 3 Support / OnDragOut() simulating what stickyPress used to do/
« on: January 14, 2015, 09:42:35 PM »
Hello, I am a noob at programming and never really used the stickyPress ability that NGUI had.
I am programming for touch devices with the latest versions of Unity and NGUI
My question is, How do i simulate what stickyPress use to do with OnDragOut() or force the release any button.

   #region NGUIFunction
   void OnPress (bool isPressed)
   {
      if(StaticVariables.isTheGamePaused == false)
      {
         if (isPressed)
         {   //if this is a jumping button
            if(jumpB)
            {   //tell the player to jump
               _pI.Jump ();
            }
            else if(magicB)
            {   //start the magic skill
               _pI.DoMagic ();
            }
            else if(shieldB)
            {   //start shield
               _pI.Shield(isPressed);
            }
         }
         else if(!isPressed && shieldB)
         {   //stop shield
            _pI.Shield(isPressed);
         }

      }
   }

   void OnDragOut()
   {   //Release this button
      //OnPress (false);
   }
   #endregion

Pages: [1]