摘要: 只攻击正前方的单位,向前发射一条射线,攻击碰到的单位RaycastHit hit;//range 射线的长度,即攻击范围,maskTarget敌方单位的mask,只攻击敌方单位if(Physics.Raycast(unit.thisT.position, unit.thisT.forward, ou... 阅读全文
posted @ 2014-08-17 11:18 softimagewht 阅读(967) 评论(0) 推荐(0)
摘要: using UnityEngine;using System.Collections;public class ProjectileTest : MonoBehaviour{ public GameObject target; public float speed = 10; pr... 阅读全文
posted @ 2014-08-17 11:12 softimagewht 阅读(1936) 评论(0) 推荐(0)