public override void Attack(AttackData attackData, ActorBase target) { //bulletGroup.Attack(m_actor.actorGameObject.weaponPoint.position, m_actor.actorGameObject.transform.rotation, attackData, null); }
public virtual void Attack(AttackData attackData, ActorBase target) { }
/// <summary> /// 创建伤害 /// </summary> protected virtual void CreateDamage(ActorBase actor) { m_isDamage = true; // actor.BeAttack(m_attackData); }
public virtual void Initialize(ActorBase actor) { m_actor = actor; }
public void CreateBullet(int index, Vector3 position, Quaternion rotation, AttackData attackData, ActorBase target) { var bullet = Game.gamePool.Spawn <GeneralBullet>(bulletAssetPath); bullet.Initialize(); bullet.speed = speed; bullet.lifeTime = lifeTime; bullet.firePosition = position; bullet.fireRotation = Quaternion.Euler(rotation.eulerAngles + angles[index]); bullet.Spawn(attackData, target); }
IEnumerator Fire(Vector3 position, Quaternion rotation, AttackData attackData, ActorBase target) { for (int i = 0; i < count; i++) { CreateBullet(i, position, rotation, attackData, target); if (delay > 0) { yield return(new WaitForSeconds(delay)); } } yield return(null); }
public void Attack(Vector3 position, Quaternion rotation, AttackData attackData, ActorBase target) { Game.mainGame.StartCoroutine(Fire(position, rotation, attackData, target)); }
void Start() { m_actor = gameObject.GetComponentInParent <ActorBase>(); }