Files
KOF/Assets/_KOF/Scripts/Enemys/DragonBoss.cs
2025-07-02 15:13:26 +08:00

34 lines
792 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DragonBoss : Enemy
{
public Launcher leftGun;
public void DelSelf()
{
if (isServer)
{
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();
}
}
}