mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-23 14:17:59 +01:00
35 lines
831 B
C#
35 lines
831 B
C#
using Fie.Object;
|
|
using UnityEngine;
|
|
|
|
namespace Fie.Enemies.HoovesRaces.QueenChrysalis
|
|
{
|
|
[FiePrefabInfo("Prefabs/Enemies/ChangelingForces/QueenChrysalis/Power/QueenChrysalisAirRaidPreEffect")]
|
|
public class FieEmitObjectQueenChrysalisAirRaidPreHit : FieEmittableObjectBase
|
|
{
|
|
private const float DURATION = 2f;
|
|
|
|
[SerializeField]
|
|
private float _damageDuration = 0.3f;
|
|
|
|
private float _lifeCount;
|
|
|
|
public override void awakeEmitObject()
|
|
{
|
|
base.transform.rotation = Quaternion.identity;
|
|
destoryEmitObject(2f);
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
_lifeCount += Time.deltaTime;
|
|
}
|
|
|
|
private void OnTriggerEnter(Collider collider)
|
|
{
|
|
if (!(_lifeCount > _damageDuration) && collider.gameObject.tag == getHostileTagString())
|
|
{
|
|
addDamageToCollisionCharacter(collider, getDefaultDamageObject());
|
|
}
|
|
}
|
|
}
|
|
}
|