36 lines
734 B
C#
36 lines
734 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Animancer;
|
|
using DragonLi.Core;
|
|
using Mirror;
|
|
using Unity.XR.PXR;
|
|
using UnityEngine;
|
|
|
|
public class Zombie : Enemy
|
|
{
|
|
public GameObject attackEffect;
|
|
private AnimationClip _attackClip;
|
|
public override void OnSpawn()
|
|
{
|
|
base.OnSpawn();
|
|
attackEffect.SetActive(false);
|
|
}
|
|
|
|
public override void OnUpdate()
|
|
{
|
|
base.OnUpdate();
|
|
}
|
|
|
|
public override void DoAttack()
|
|
{
|
|
base.DoAttack();
|
|
if(attackEffect==null)
|
|
return;
|
|
attackEffect.SetActive(true);
|
|
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
|
{
|
|
attackEffect.SetActive(false);
|
|
}, 1f);
|
|
}
|
|
}
|