- 最后登录
- 2016-8-29
- 注册时间
- 2012-8-25
- 阅读权限
- 90
- 积分
- 23585
- 纳金币
- 20645
- 精华
- 62
|
- void Update () {
- Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
- RaycastHit hit;
- if (Physics.Raycast (ray, out hit))
- {
- if(Input.GetMouseButtonDown(0))
- {
- GameObject hitobj = hit.collider.gameObject;
- if (hitobj.transform.name.CompareTo("Plane") == 0)
- {
- print (Input.mousePosition);
- Instantiate (Resources.Load ("effects/DEFX/PhysicalEffects/ComboRipEffect"), fighter.transform.position, fighter.transform.rotation);
- animation.Play ("attack");
- }
- }
- }
复制代码 |
|