Project_WL/Assets/Script/Character/Object/StoneActor.cs

73 lines
1.6 KiB
C#
Raw Normal View History

2024-12-15 01:39:39 +00:00
using System.Collections.Generic;
using UnityEngine;
public class StoneActor : Actor
{
Dictionary<int, int> dic_hp = new Dictionary<int, int>
{
{ 0, 1000 },
{ 1, 10000 },
{ 2, 100000 },
{ 3, 1000000 },
{ 4, 10000000 },
{ 5, 100000000 },
{ 6, 1000000000 },
};
float BattleTime;
public void Set(int step, Vector3 warppos)
{
gameObject.SetActive(true);
m_Enemy = true;
Init_CC();
//Make_HUDUI();
2024-12-15 01:39:39 +00:00
m_Stat = new ActorStatInfo(m_Role);
if (dic_hp.ContainsKey(step))
{
m_Stat.Set_Stat(eStat.MaxHP, dic_hp[step]);
m_Stat.Set_Stat(eStat.HP, dic_hp[step]);
}
else
{
m_Stat.Set_Stat(eStat.MaxHP, double.MaxValue);
m_Stat.Set_Stat(eStat.HP, double.MaxValue);
}
BattleTime = 0f;
m_NavMeshAgent.speed = 0f;
Set_Warp(warppos);
DeadStatus = false;
Play_Idle();
}
protected override void Update()
{
base.Update();
2024-12-15 01:39:39 +00:00
if (BattleTime > 0f && !IsOnlyDead())
{
BattleTime -= Time.deltaTime;
if (BattleTime <= 0f)
Heal(1f);
}
}
public override void Get_Damage(DamageInfo _dinfo)
{
if (BattleTime <= 0f)
BattleTime = 60f;
base.Get_Damage(_dinfo);
if (IsOnlyDead())
{
// 다음 바위
ServerInfo.Ins.m_ServerData.Add_FarmMaxSlot();
2025-03-22 23:18:26 +00:00
if (MainToFarm.isIns) MainToFarm.Ins.Set_Stone(10f);
2024-12-15 01:39:39 +00:00
}
}
}