TouchAnimation触摸动画源码
var hit : RaycastHit;function Update () {
// Use Raycast to pick objects that have mesh colliders attached.
var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
if (Input.GetMouseButtonDown (0))//Returns true during the frame the user touches the object
{
if (Physics.Raycast (ray, hit, 100))
{
animation.Play("forward");
}
}
if (Input.GetMouseButtonUp (0))//Returns true during the frame the user deselects the object
{
if (Physics.Raycast (ray, hit, 100))
{
animation.Play("backward");
}
}
else {
}
}
wwoww ! willy try it ! 好东西 看看 {:5_404:}{:5_404:}{:5_404:}{:5_404:}{:5_404:}
不错 不错 不错{:soso__3922851084632044791_6:} 大家顶起啊 新手感谢了 感谢分享啊 thank you{:5_408:}{:5_376:}{:5_430:}
感谢楼主的无私分享!{:soso__11402694654016840197_7:} 感谢分享 谢谢