【Unity3D自学记录】NGUI之UIButtonMessage长按

对UIButtonMessage进行修改

void OnPress (bool isPressed)
	{
		if (enabled)
		{
			if (((isPressed && trigger == Trigger.OnPress) ||
				(!isPressed && trigger == Trigger.OnRelease))) Send();
		}
        try
        {
            if (isPressed)
            {
                //按住
            }
            else
            {
                //松手
            }
        }
        catch (Exception e) {
            Debug.Log(e.Message);
        }
	}


你可能感兴趣的:(unity3d)