摘要: 一:获取对象, 添加对象等1:使用prefab生成对象 GameObject ballObj = GameObject.Instantiate(Resources.Load("Fx/fx_bullet001"), transform.position + transform.forward * -0.8f + transform.up * 2, Quaternion.identity) as GameObject;2:添加脚本到对象, 并更改脚本值 ballObj.AddComponent ("BasicGun"); BasicGun pScript = 阅读全文
posted @ 2013-11-22 11:12 willbin 阅读(1628) 评论(0) 推荐(0) 编辑