[feat] 매직미사일 구현 시작

- 몬스터가 사용할 총알 베이스 생성

work in DEG-100
This commit is contained in:
Fiore 2025-04-29 11:13:18 +09:00
parent 99082eeb7c
commit bc88d47e6b
6 changed files with 79 additions and 1 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a636af603b3af4d1baccb8296add7485
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,25 @@
using UnityEngine;
public struct BulletData
{
public Vector3 TargetPos;
public float Damage;
public float LifeTime;
public float Speed;
public BulletData(Vector3 targetPos, float damage, float lifeTime, float speed)
{
TargetPos = targetPos;
Damage = damage;
LifeTime = lifeTime;
Speed = speed;
}
}
public class BulletBase : MonoBehaviour
{
private float _speed;
private Vector3 _targetPosition;
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1c349f971ec844b19d94a06e8f93aca0
timeCreated: 1745890918

View File

@ -0,0 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MagicMissaile : BulletBase
{
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cc3f5b56a395f448c881888076d83cba
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5,6 +5,10 @@ using UnityEngine;
public class CasterDemonController : EnemyController public class CasterDemonController : EnemyController
{ {
private bool _doneBattleSequence = true; private bool _doneBattleSequence = true;
private bool _isFirstNoPath = true;
[SerializeField] private Transform teleportTransform;
[SerializeField] private GameObject magicMissilePrefab;
public override void BattleSequence() public override void BattleSequence()
{ {
@ -25,6 +29,25 @@ public class CasterDemonController : EnemyController
public override void OnCannotFleeBehaviour() public override void OnCannotFleeBehaviour()
{ {
Debug.Log("## 몬스터가 막다른 길에 몰려 뭔가 함"); if (_isFirstNoPath)
{
Debug.Log("## 몬스터가 처음으로 막다른 길에 몰렸습니다.");
} }
else
{
Debug.Log("## 몬스터가 다시 막다른 길에 몰렸습니다.");
}
}
private void ShotMagicMissile()
{
this.transform.LookAt(TraceTargetTransform.position);
}
private void Teleport()
{
}
} }