侧边栏优化
This commit is contained in:
parent
a933740783
commit
9a169f666e
@ -73,6 +73,18 @@ namespace BF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void StopTouchAnimation()
|
||||||
|
{
|
||||||
|
if (sequence != null && sequence.IsPlaying())
|
||||||
|
{
|
||||||
|
sequence.Pause();
|
||||||
|
if (!ReferenceEquals(originScale, null))
|
||||||
|
{
|
||||||
|
this.transform.localScale = originScale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void OnPointerDown(PointerEventData eventData)
|
public void OnPointerDown(PointerEventData eventData)
|
||||||
{
|
{
|
||||||
if (!enable)
|
if (!enable)
|
||||||
@ -83,7 +95,6 @@ namespace BF
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
touchEvent = UITouchEventType.Down;
|
touchEvent = UITouchEventType.Down;
|
||||||
#endif
|
#endif
|
||||||
@ -95,8 +106,6 @@ namespace BF
|
|||||||
{
|
{
|
||||||
luaFunc((int)UITouchEventType.Down, eventData.position.x, eventData.position.y);
|
luaFunc((int)UITouchEventType.Down, eventData.position.x, eventData.position.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnPointerUp(PointerEventData eventData)
|
public void OnPointerUp(PointerEventData eventData)
|
||||||
|
|||||||
@ -21,13 +21,14 @@ namespace XLua.CSObjectWrap
|
|||||||
{
|
{
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||||
System.Type type = typeof(BF.UITouchEvent);
|
System.Type type = typeof(BF.UITouchEvent);
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 10, 1, 1);
|
Utils.BeginObjectRegister(type, L, translator, 0, 11, 1, 1);
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddTouchEventListener", _m_AddTouchEventListener);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddTouchEventListener", _m_AddTouchEventListener);
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveEventListener", _m_RemoveEventListener);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveEventListener", _m_RemoveEventListener);
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetShowClickAnimation", _m_SetShowClickAnimation);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetShowClickAnimation", _m_SetShowClickAnimation);
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetShowClickAnimation", _m_GetShowClickAnimation);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetShowClickAnimation", _m_GetShowClickAnimation);
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTouchEnable", _m_SetTouchEnable);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTouchEnable", _m_SetTouchEnable);
|
||||||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StopTouchAnimation", _m_StopTouchAnimation);
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPointerDown", _m_OnPointerDown);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPointerDown", _m_OnPointerDown);
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPointerUp", _m_OnPointerUp);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPointerUp", _m_OnPointerUp);
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPointerEnter", _m_OnPointerEnter);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPointerEnter", _m_OnPointerEnter);
|
||||||
@ -215,6 +216,33 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch(System.Exception gen_e) {
|
||||||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int _m_StopTouchAnimation(RealStatePtr L)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||||
|
|
||||||
|
|
||||||
|
BF.UITouchEvent gen_to_be_invoked = (BF.UITouchEvent)translator.FastGetCSObj(L, 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
gen_to_be_invoked.StopTouchAnimation( );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user