标签:
void OnMouseOver()//鼠标碰上该物体
{
if (Input.GetMouseButtonDown(0))//点击鼠标
....
TweenPosition动画效果的播放:
TweenPos.PlayReverse();
TweenPos.PlayForward();
鼠标点击并且没有碰到人物,比如用于点击对话框 不让人物走路、转向
(Input.GetMouseButtonDown(0) && UICamera.hoveredObject==null)
每隔一段时间执行函数
public void Awake()
{
InvokeRepeating("AllOtherPlayersIdel", 2f, 3f);
}
void AllOtherPlayersIdel()
{
foreach (KeyValuePair<string, GameObject> a in PlayerGameObjectLIst)
a.Value.GetComponent<PlayerAnimation>().MyState = PlayerState.Idle;
}
节点之间传送消息
BroadcastMessage
SendMessageUpwards
场景切换自动调用的函数
public void OnLevelWasLoaded(int level)
{
if (level < 2)
{
return;
}
播放动画
CrossFade
标签:
原文地址:http://www.cnblogs.com/notlate/p/4518796.html