스탯테스트에 스킬 추가
This commit is contained in:
parent
6cbb678600
commit
84594b87a2
File diff suppressed because it is too large
Load Diff
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class Actor : MyCoroutine
|
||||
{
|
||||
|
|
@ -528,6 +529,9 @@ public class Actor : MyCoroutine
|
|||
}
|
||||
}
|
||||
|
||||
Cal_Damage(_dinfo);
|
||||
Check_CC_byAttack(_dinfo);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "StatTest")
|
||||
{
|
||||
|
|
@ -535,9 +539,6 @@ public class Actor : MyCoroutine
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
Cal_Damage(_dinfo);
|
||||
Check_CC_byAttack(_dinfo);
|
||||
}
|
||||
public virtual void Cal_Damage(DamageInfo _dinfo)
|
||||
{
|
||||
|
|
@ -581,6 +582,10 @@ public class Actor : MyCoroutine
|
|||
Play_Hit();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "StatTest")
|
||||
return;
|
||||
#endif
|
||||
// UI 설정
|
||||
m_HUDUI.Set_HPSlider(m_Stat.Get_Stat(eStat.HP), m_Stat.Get_Stat(eStat.MaxHP));
|
||||
InGameInfo.Ins.Get_HUDDMGUI().Set(tf_HUD_Dmg, _dinfo.TextColor, _dinfo.Damage, _dinfo.Critical);
|
||||
|
|
@ -729,11 +734,16 @@ public class Actor : MyCoroutine
|
|||
if (IsDead() || DSUtil.CheckNull(m_Magic)) return;
|
||||
|
||||
InGameInfo.Ins.Shoot_Effect(m_SkillData);
|
||||
SoundInfo.Ins.Play_OneShot(eSound.s009_CastSpell);
|
||||
if (IsRole(eRole.PC))
|
||||
NewGameUI.Ins.m_GuideQuestUI.Add_GuideQuest(ePurpose.ShootMagic);
|
||||
//SoundInfo.Ins.Play_OneShot(eSound.s009_CastSpell);
|
||||
//if (IsRole(eRole.PC))
|
||||
//NewGameUI.Ins.m_GuideQuestUI.Add_GuideQuest(ePurpose.ShootMagic);
|
||||
Del_Magic();
|
||||
}
|
||||
public void Set_Magic(SkillListTableData skill, Actor target)
|
||||
{
|
||||
m_Magic = new UseMagicInfo { m_SkillTableData = skill };
|
||||
m_SkillData = new ProjectileData { shooter = this, target = target, m_SkillListTableData = skill };
|
||||
}
|
||||
public void Del_Magic()
|
||||
{
|
||||
if (!DSUtil.CheckNull(co_casting))
|
||||
|
|
@ -765,7 +775,14 @@ public class Actor : MyCoroutine
|
|||
if (IsDead()) return;
|
||||
|
||||
m_Stat.Set_Stat(true, eStat.HP, _hp);
|
||||
if (m_HUDUI != null) m_HUDUI.Set_HPSlider(m_Stat.Get_Stat(eStat.HP), m_Stat.Get_Stat(eStat.MaxHP));
|
||||
#if UNITY_EDITOR
|
||||
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "StatTest")
|
||||
{
|
||||
MainToStatTest.Ins.Set_Dmglabel($"HP : {_hp}");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (!DSUtil.CheckNull(m_HUDUI)) m_HUDUI.Set_HPSlider(m_Stat.Get_Stat(eStat.HP), m_Stat.Get_Stat(eStat.MaxHP));
|
||||
if (showhud)
|
||||
InGameInfo.Ins.Get_HUDDMGUI().Set(tf_HUD_Dmg, "<color=#00ff00>", _hp, eStat.None);
|
||||
}
|
||||
|
|
@ -774,6 +791,15 @@ public class Actor : MyCoroutine
|
|||
if (IsDead()) return;
|
||||
|
||||
m_Stat.Set_Stat(true, eStat.MP, _mp);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "StatTest")
|
||||
{
|
||||
MainToStatTest.Ins.Set_Dmglabel($"MP : {_mp}");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (showhud)
|
||||
InGameInfo.Ins.Get_HUDDMGUI().Set(tf_HUD_Dmg, "<color=#0000ff>", _mp, eStat.None);
|
||||
}
|
||||
|
|
@ -1422,6 +1448,13 @@ public class Actor : MyCoroutine
|
|||
Stun(StunAfterKnockBackTime, true);
|
||||
StunAfterKnockBackTime = 0f;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (SceneManager.GetActiveScene().name == "StatTest")
|
||||
{
|
||||
transform.localPosition = Vector3.zero;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
public void Stun_AfterKnockBack(float time) { StunAfterKnockBackTime = time; }
|
||||
#endregion
|
||||
|
|
@ -1613,7 +1646,7 @@ public class Actor : MyCoroutine
|
|||
if (!string.IsNullOrEmpty(m_Magic.m_SkillTableData.s_NextAnimation))
|
||||
{
|
||||
co_casting = StartCoroutine(Co_Casting(m_Magic.m_SkillTableData.f_CastingTime));
|
||||
m_NavMeshAgent.ResetPath();
|
||||
if (m_NavMeshAgent.isOnNavMesh) m_NavMeshAgent.ResetPath();
|
||||
}
|
||||
|
||||
if (m_Magic.m_SkillTableData.e_Skill == eEffect.Skill_JumpAttack)
|
||||
|
|
|
|||
|
|
@ -355,6 +355,12 @@ public class MobActor : Actor
|
|||
|
||||
protected override void Set_Die()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (SceneManager.GetActiveScene().name == "StatTest")
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
m_actDie?.Invoke(m_MonsterTableData.n_MonsterID);
|
||||
sdata.Add_CollectionMobKill(m_MonsterTableData.n_MonsterID);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using CodeStage.AntiCheat.ObscuredTypes;
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public enum eSummon { Golem, Worm }
|
||||
|
||||
|
|
@ -46,6 +47,13 @@ public class SummonActor : MyActor
|
|||
{
|
||||
base.Update();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (SceneManager.GetActiveScene().name == "StatTest")
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (LifeTime > 0f)
|
||||
{
|
||||
LifeTime -= Time.deltaTime;
|
||||
|
|
|
|||
|
|
@ -118,6 +118,8 @@ public class ProjectileBase : MonoBehaviour
|
|||
m_ProjectTileData.m_ProjectileBase = this;
|
||||
m_DamageInfo = Get_NewDamageInfo();
|
||||
|
||||
var isNullTarget = DSUtil.CheckNull(m_ProjectTileData.target);
|
||||
|
||||
if (m_ProjectTileData.IsSkill())
|
||||
{
|
||||
var skillData = m_ProjectTileData.m_SkillListTableData;
|
||||
|
|
@ -136,7 +138,7 @@ public class ProjectileBase : MonoBehaviour
|
|||
}
|
||||
|
||||
m_ProjectTileData.m_skillTypeConfigTable = table_skilltypeconfig.Ins.Get_Data_orNull(m_ProjectTileData.e_SkillExtraType);
|
||||
if (!DSUtil.CheckNull(m_ProjectTileData.m_skillTypeConfigTable) &&
|
||||
if (!isNullTarget && !DSUtil.CheckNull(m_ProjectTileData.m_skillTypeConfigTable) &&
|
||||
m_ProjectTileData.m_skillTypeConfigTable.e_SkillExtraTiming == eSkillExtraTiming.Start)
|
||||
m_ProjectTileData.target.Check_Extra(m_DamageInfo);
|
||||
|
||||
|
|
@ -161,7 +163,7 @@ public class ProjectileBase : MonoBehaviour
|
|||
case eProjectileStartPos.Custom: transform.position = _data.v3_StartPos; break;
|
||||
}
|
||||
|
||||
if (!DSUtil.CheckNull(_data.target))
|
||||
if (!isNullTarget)
|
||||
{
|
||||
if (_data.LookTarget)
|
||||
{
|
||||
|
|
@ -257,7 +259,13 @@ public class ProjectileBase : MonoBehaviour
|
|||
protected List<Actor> Get_Enemies()
|
||||
{ return ActorInfo.Ins.Get_EnemyActors(m_ProjectTileData.shooter.IsEnemy(), transform.position); }
|
||||
protected List<Actor> Get_Enemies(Transform tf, float dist)
|
||||
{ return ActorInfo.Ins.Get_EnemyActors(m_ProjectTileData.shooter.IsEnemy(), tf.position, dist); }
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "StatTest")
|
||||
return new List<Actor> { MainToStatTest.Ins.actors[1] };
|
||||
#endif
|
||||
return ActorInfo.Ins.Get_EnemyActors(m_ProjectTileData.shooter.IsEnemy(), tf.position, dist);
|
||||
}
|
||||
|
||||
protected void Show_HitEffect(bool effectbyHit, Actor target)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ public class Skill_Golem : ProjectileBase
|
|||
var summon = actor as SummonActor;
|
||||
var dmg = (float)Get_DamageInfo(false, false).Damage;
|
||||
summon.Set(_data.shooter.IsEnemy(), _data.shooter, _data.LifeTime, dmg, dmg, 1);
|
||||
ServerInfo.Ins.m_ServerData.Add_TitleCondition(65); // 칭호 : 골렘과 나
|
||||
|
||||
if (IsStep(3)) StartCoroutine(Co_Step3(summon));
|
||||
else Off();
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ public partial class InGameInfo : MyCoroutine
|
|||
}
|
||||
}
|
||||
|
||||
if (temp == null)
|
||||
if (DSUtil.CheckNull(temp))
|
||||
{
|
||||
temp = DSUtil.Get_Clone<HUDDMGUI>("InGame/HUDDMGUI", NewGameUI.Ins.tf_HUD);
|
||||
list_HUDDMGUI.Add(temp);
|
||||
|
|
@ -262,7 +262,7 @@ public partial class InGameInfo : MyCoroutine
|
|||
return;
|
||||
case eSkillTarget.Pet:
|
||||
_ptd.target = _ptd.shooter.Get_MyPet();
|
||||
if (DSUtil.CheckNull(_ptd.target)) return; // 펫이 없으면 발동x
|
||||
//if (DSUtil.CheckNull(_ptd.target)) return; // 펫이 없으면 발동x
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
|
|
@ -7,6 +5,7 @@ public class PlayClickSound_Only : MonoBehaviour, IPointerUpHandler
|
|||
{
|
||||
public void OnPointerUp(PointerEventData eventData)
|
||||
{
|
||||
SoundInfo.Ins.Play_OneShot(eSound.s003_Click, 0.5f);
|
||||
if (!DSUtil.CheckNull(SoundInfo.Ins))
|
||||
SoundInfo.Ins.Play_OneShot(eSound.s003_Click, 0.5f);
|
||||
}
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ public class PlaySoundOnAnim : MonoBehaviour
|
|||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (m_Clip)
|
||||
if (m_Clip && !DSUtil.CheckNull(SoundInfo.Ins))
|
||||
m_AS = SoundInfo.Ins.Play_OneShot_byDistance(m_Clip, transform.position, m_Volume, IsLoop);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,11 +10,14 @@ public class MainToStatTest : MonoBehaviourSingletonTemplate<MainToStatTest>
|
|||
public TextMeshProUGUI[] labels; // 0 pc 스탯, 1 몹 스탯, 2 데미지, 3 클래스 정보
|
||||
public TMP_InputField[] inputs; // 0 몹 방어력, 1 몹 마법저항력
|
||||
public TMP_Dropdown m_TMP_Dropdown; // 공격 타입
|
||||
public TMP_Dropdown m_TMP_Dropdown_Skill; // 스킬
|
||||
|
||||
List<eStat> list_showmobstat = new List<eStat> { eStat.BaseDmg, eStat.MaxHP, eStat.MaxMP, eStat.FinalAttackSpeed, eStat.FinalMoveSpeed, eStat.FinalDef, eStat.FinalMDef };
|
||||
List<string> list_dmg = new List<string>();
|
||||
int m_ClassID = 10501;
|
||||
string m_AttackType = "P";
|
||||
int m_SkillIndex;
|
||||
List<SkillListTableData> list_skilldata = new List<SkillListTableData>();
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
|
|
@ -36,6 +39,14 @@ public class MainToStatTest : MonoBehaviourSingletonTemplate<MainToStatTest>
|
|||
m_TMP_Dropdown.options.Add(new TMP_Dropdown.OptionData { text = $"{classlst[i].n_ClassID},M,{classlst[i].Get_Name()}" });
|
||||
}
|
||||
|
||||
m_TMP_Dropdown_Skill.options.Clear();
|
||||
var skilllst = table_skilllist.Ins.Get_DataList(eSkillType.Active);
|
||||
for (int i = 0; i < skilllst.Count; i++)
|
||||
{
|
||||
list_skilldata.Add(skilllst[i]);
|
||||
m_TMP_Dropdown_Skill.options.Add(new TMP_Dropdown.OptionData { text = $"{skilllst[i].Get_Name()},{i}" });
|
||||
}
|
||||
|
||||
// 캐릭터 세팅 및 수치 표시
|
||||
Set_Class();
|
||||
actors[0].Stop(false);
|
||||
|
|
@ -90,6 +101,17 @@ public class MainToStatTest : MonoBehaviourSingletonTemplate<MainToStatTest>
|
|||
var classdata = table_classconfig.Ins.Get_Data_orNull(m_ClassID);
|
||||
labels[3].text = $"{classdata.Get_JobName()}, {classdata.e_BattleType}, {actors[0].m_AttackType}";
|
||||
}
|
||||
public void Set_Skill()
|
||||
{
|
||||
var split = m_TMP_Dropdown_Skill.captionText.text.Split(',');
|
||||
m_SkillIndex = int.Parse(split[1]);
|
||||
OnClick_ReSkill();
|
||||
}
|
||||
public void OnClick_ReSkill()
|
||||
{
|
||||
actors[0].Set_Magic(list_skilldata[m_SkillIndex], actors[1]);
|
||||
actors[0].Play_Skill(list_skilldata[m_SkillIndex].s_Animation);
|
||||
}
|
||||
|
||||
public void Set_Dmglabel(string s)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue