using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
using UnityEngine.Events;
using UnityEngine.EventSystems;
public class LeftMenuBarEvent
{
private static LeftMenuBarEvent leftMenuBar_this;
//private LeftMenuBarEvent()
//{
//}
public static LeftMenuBarEvent Instance()
{
if (leftMenuBar_this == null)
{
leftMenuBar_this = new LeftMenuBarEvent();
}
return leftMenuBar_this;
}
private bool m_state = true;
private EventTrigger m_eventTrigger;
public GameObject PanelName;
public void StartInit(GameObject Obj)
{
Obj.transform.Find("LeftBarPanel/menu/_right").gameObject.SetActive(true);
Obj.transform.Find("LeftBarPanel/menu/_left").gameObject.SetActive(false);
}
publ
unity中EventTrigger组件的应用
最新推荐文章于 2025-12-05 11:26:35 发布
本文介绍了一个使用Unity实现的带有动画效果的左侧菜单栏,该菜单栏通过EventTrigger响应鼠标进入和离开事件,并利用DOTween插件平滑地改变菜单的位置。

最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



