study/first_study/Assets/Scripts/EnemySc/MobBase.cs
jh04010421 e08e5b3c7c 윤지호 | LostBits 기능 구현
20226.01.29 수정 (공격, 피격, 아이템 드랍 및 획득 구현 완료, 히트박스 트리거 버그 수정완)
다음 작업 : 공중몬스터 구현, 태그 스킬 구현
2026-02-02 21:41:06 +09:00

69 lines
1.5 KiB
C#

/*using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor.U2D.Animation;
using UnityEngine;
using UnityEngine.PlayerLoop;
[System.Serializable]
public class MobStat
{
[SerializeField] private float baseValue;
private float _value;
private bool _isChange = true;
private List<float> modifiers = new List<float>();
public MobStat(float baseValue)
{
this.baseValue = baseValue;
}
private float CalculStat()
{
float finalValue = baseValue;
foreach(float m in modifiers)
{
_value += m;
}
return finalValue;
}
public float fvalue
{
get { return fvalue; }
}
public int ivalue
{
get { return ivalue; }
}
}
public class MobBase : MonoBehaviour
{
[Header("Character Data")]
[SerializeField] private EnemyStat enemyStat;
public MobStat MaxSpeed;
public MobStat JumpPower;
public MobStat MaxJumpCount;
public MobStat Hp;
void Awake()
{
if (enemyStat == null)
{
Debug.LogError("Character Data°¡ ÇÒ´çµÇÁö ¾Ê¾Ò½À´Ï´Ù!");
}
else
{
InitializeStat();
}
}
public void InitializeStat()
{
MaxSpeed = new MobStat(enemyStat.playerMaxSpeed);
JumpPower = new MobStat(enemyStat.playerJumpPower);
MaxJumpCount = new MobStat(enemyStat.playerMaxJumpCount);
Hp = new MobStat(enemyStat.playerHp);
}
}*/