39 lines
847 B
C#
39 lines
847 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class DragonBoss : Enemy
|
|
{
|
|
public Launcher leftGun;
|
|
public void DelSelf()
|
|
{
|
|
GameManager.Ins.DeleteEnemy(id);
|
|
CreatExplosion();
|
|
}
|
|
|
|
public override void UpdateRotation()
|
|
{
|
|
if (target != null)
|
|
{
|
|
Vector3 targetPos = new Vector3(target.transform.position.x, transform.position.y, target.transform.position.z);
|
|
transform.rotation = Quaternion.Lerp(transform.rotation, Quaternion.LookRotation(targetPos - transform.position), Time.deltaTime * 10);
|
|
}
|
|
}
|
|
|
|
public override void Shoot()
|
|
{
|
|
if (isAlive)
|
|
{
|
|
leftGun.Shoot();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 普通攻击一次
|
|
/// </summary>
|
|
public void FireOnce()
|
|
{
|
|
|
|
}
|
|
}
|