Compare commits
2 Commits
a5c5f8b28d
...
4262387136
| Author | SHA1 | Date |
|---|---|---|
|
|
4262387136 | |
|
|
97b4090036 |
|
|
@ -9,7 +9,7 @@
|
|||
몬스터 펜스 공격하기
|
||||
// - 몬스터 공격 프리팹 만들기
|
||||
// - 몬스터 공격 애님
|
||||
- 프리팹 발사!
|
||||
// - 프리팹 발사!
|
||||
- 펜스 hp 깍기
|
||||
- 펜스 부서지면 패배 화면
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
[{"n_MonsterTypeID":"2001","e_MonsterType":"Monster","f_DefaultAttack":"10","f_DefaultHp":"40","n_DropExp":"1","e_UnityType":"Melee","f_AttackRange":"1.2","f_AttackDelay":"1.1","f_MoveSpeed":"1","e_MoveType":"Static","n_ProjectileID":"3101","s_MonsterPrefabPath":"2001","f_Scale":"0.15","e_ShieldType":"None","n_NormalShieldCount":"0","n_InvinityShieldCount":"0"},{"n_MonsterTypeID":"2002","e_MonsterType":"Monster","f_DefaultAttack":"20","f_DefaultHp":"60","n_DropExp":"1","e_UnityType":"Range","f_AttackRange":"5","f_AttackDelay":"2","f_MoveSpeed":"1.2","e_MoveType":"Static","n_ProjectileID":"3102","s_MonsterPrefabPath":"2002","f_Scale":"0.15","e_ShieldType":"Static","n_NormalShieldCount":"1","n_InvinityShieldCount":"0"},{"n_MonsterTypeID":"2003","e_MonsterType":"Boss","f_DefaultAttack":"30","f_DefaultHp":"60","n_DropExp":"3","e_UnityType":"Melee","f_AttackRange":"2","f_AttackDelay":"1.5","f_MoveSpeed":"1.2","e_MoveType":"Random","n_ProjectileID":"3101","s_MonsterPrefabPath":"2003","f_Scale":"0.3","e_ShieldType":"Rotation","n_NormalShieldCount":"1","n_InvinityShieldCount":"1"},{"n_MonsterTypeID":"2004","e_MonsterType":"Monster","f_DefaultAttack":"10","f_DefaultHp":"40","n_DropExp":"1","e_UnityType":"Melee","f_AttackRange":"1.2","f_AttackDelay":"1.1","f_MoveSpeed":"1","e_MoveType":"Static","n_ProjectileID":"3101","s_MonsterPrefabPath":"2004","f_Scale":"0.15","e_ShieldType":"None","n_NormalShieldCount":"0","n_InvinityShieldCount":"0"},{"n_MonsterTypeID":"2005","e_MonsterType":"Monster","f_DefaultAttack":"20","f_DefaultHp":"60","n_DropExp":"1","e_UnityType":"Range","f_AttackRange":"5","f_AttackDelay":"2","f_MoveSpeed":"1.2","e_MoveType":"Static","n_ProjectileID":"3102","s_MonsterPrefabPath":"2005","f_Scale":"0.15","e_ShieldType":"Static","n_NormalShieldCount":"1","n_InvinityShieldCount":"0"},{"n_MonsterTypeID":"2006","e_MonsterType":"Boss","f_DefaultAttack":"30","f_DefaultHp":"60","n_DropExp":"3","e_UnityType":"Range","f_AttackRange":"4.5","f_AttackDelay":"1.5","f_MoveSpeed":"1.2","e_MoveType":"Random","n_ProjectileID":"3102","s_MonsterPrefabPath":"2006","f_Scale":"0.3","e_ShieldType":"Rotation","n_NormalShieldCount":"1","n_InvinityShieldCount":"1"}]
|
||||
[{"n_MonsterTypeID":"2001","e_MonsterType":"Monster","n_DefaultAttack":"10","n_DefaultHp":"40","n_DropExp":"1","e_UnityType":"Melee","f_AttackRange":"1.2","f_AttackDelay":"1.1","f_MoveSpeed":"1","e_MoveType":"Static","n_ProjectileID":"3101","s_MonsterPrefabPath":"2001","f_Scale":"0.15","e_ShieldType":"None","n_NormalShieldCount":"0","n_InvinityShieldCount":"0"},{"n_MonsterTypeID":"2002","e_MonsterType":"Monster","n_DefaultAttack":"20","n_DefaultHp":"60","n_DropExp":"1","e_UnityType":"Range","f_AttackRange":"5","f_AttackDelay":"2","f_MoveSpeed":"1.2","e_MoveType":"Static","n_ProjectileID":"3102","s_MonsterPrefabPath":"2002","f_Scale":"0.15","e_ShieldType":"Static","n_NormalShieldCount":"1","n_InvinityShieldCount":"0"},{"n_MonsterTypeID":"2003","e_MonsterType":"Boss","n_DefaultAttack":"30","n_DefaultHp":"60","n_DropExp":"3","e_UnityType":"Melee","f_AttackRange":"2","f_AttackDelay":"1.5","f_MoveSpeed":"1.2","e_MoveType":"Random","n_ProjectileID":"3101","s_MonsterPrefabPath":"2003","f_Scale":"0.3","e_ShieldType":"Rotation","n_NormalShieldCount":"1","n_InvinityShieldCount":"1"},{"n_MonsterTypeID":"2004","e_MonsterType":"Monster","n_DefaultAttack":"10","n_DefaultHp":"40","n_DropExp":"1","e_UnityType":"Melee","f_AttackRange":"1.2","f_AttackDelay":"1.1","f_MoveSpeed":"1","e_MoveType":"Static","n_ProjectileID":"3101","s_MonsterPrefabPath":"2004","f_Scale":"0.15","e_ShieldType":"None","n_NormalShieldCount":"0","n_InvinityShieldCount":"0"},{"n_MonsterTypeID":"2005","e_MonsterType":"Monster","n_DefaultAttack":"20","n_DefaultHp":"60","n_DropExp":"1","e_UnityType":"Range","f_AttackRange":"5","f_AttackDelay":"2","f_MoveSpeed":"1.2","e_MoveType":"Static","n_ProjectileID":"3102","s_MonsterPrefabPath":"2005","f_Scale":"0.15","e_ShieldType":"Static","n_NormalShieldCount":"1","n_InvinityShieldCount":"0"},{"n_MonsterTypeID":"2006","e_MonsterType":"Boss","n_DefaultAttack":"30","n_DefaultHp":"60","n_DropExp":"3","e_UnityType":"Range","f_AttackRange":"4.5","f_AttackDelay":"1.5","f_MoveSpeed":"1.2","e_MoveType":"Random","n_ProjectileID":"3102","s_MonsterPrefabPath":"2006","f_Scale":"0.3","e_ShieldType":"Rotation","n_NormalShieldCount":"1","n_InvinityShieldCount":"1"}]
|
||||
|
|
@ -1 +1 @@
|
|||
[{"n_UnitID":"1001","f_DefaultAttack":"100","n_DefaultHp":"500","f_AttackSpeed":"1.25","n_DefaultProjectileCount":"1","n_ProjectileID":"3001","s_UnitPrefabPath":"DefaultUnit"}]
|
||||
[{"n_UnitID":"1001","n_DefaultAttack":"100","n_DefaultHp":"500","f_AttackSpeed":"1.25","n_DefaultProjectileCount":"1","n_ProjectileID":"3001","s_UnitPrefabPath":"DefaultUnit"}]
|
||||
Binary file not shown.
|
|
@ -38,7 +38,8 @@ public class AimArrowController : MonoBehaviour
|
|||
{
|
||||
IsPC = true,
|
||||
m_Data = table_projectile.Ins.Get_Data(unit.n_ProjectileID),
|
||||
tf_Start = arrow.transform
|
||||
tf_Start = arrow.transform,
|
||||
Dmg = unit.n_DefaultAttack
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using CodeStage.AntiCheat.ObscuredTypes;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
|
|
@ -9,6 +10,7 @@ public class MobActor : MonoBehaviour
|
|||
float FenceY, m_attackTimer;
|
||||
eMobState m_State = eMobState.Move;
|
||||
Animator m_Animator;
|
||||
ObscuredInt _HP; int m_HP { get { return _HP; } set { _HP = value; _HP.RandomizeCryptoKey(); } }
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
|
@ -42,6 +44,7 @@ public class MobActor : MonoBehaviour
|
|||
m_Data = data;
|
||||
FenceY = fenceY;
|
||||
m_attackTimer = m_Data.f_AttackDelay;
|
||||
m_HP = m_Data.n_DefaultHp;
|
||||
}
|
||||
|
||||
void Move()
|
||||
|
|
@ -82,7 +85,17 @@ public class MobActor : MonoBehaviour
|
|||
{
|
||||
IsPC = false,
|
||||
m_Data = table_projectile.Ins.Get_Data(m_Data.n_ProjectileID),
|
||||
tf_Start = transform
|
||||
tf_Start = transform,
|
||||
Dmg = m_Data.n_DefaultAttack
|
||||
});
|
||||
}
|
||||
|
||||
public void Get_Dmg(int dmg)
|
||||
{
|
||||
m_HP -= dmg;
|
||||
if (m_HP <= 0)
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -100,6 +100,12 @@ public class IngameMgr : MonoBehaviourSingletonTemplate<IngameMgr>
|
|||
StartCoroutine(Co_MakeMob());
|
||||
}
|
||||
|
||||
public void Get_Dmg(int dmg)
|
||||
{
|
||||
m_HP -= dmg;
|
||||
Set_Texts();
|
||||
}
|
||||
|
||||
public StageConfigTableData Get_CurStageTData() { return CurStageData; }
|
||||
public UnitTableData Get_CurUnitTData() { return CurUnitData; }
|
||||
}
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
using CodeStage.AntiCheat.ObscuredTypes;
|
||||
using UnityEngine;
|
||||
using static UnityEditor.PlayerSettings;
|
||||
using static UnityEngine.Rendering.DebugUI.Table;
|
||||
|
||||
public class Projectile : MonoBehaviour
|
||||
{
|
||||
|
|
@ -59,6 +57,8 @@ public class Projectile : MonoBehaviour
|
|||
{
|
||||
if (!m_ProjectileData.IsPC && collision.tag == "Mob") return;
|
||||
|
||||
Check_Hit(collision);
|
||||
|
||||
if (m_bounceCount <= 0)
|
||||
{
|
||||
Kill();
|
||||
|
|
@ -119,6 +119,26 @@ public class Projectile : MonoBehaviour
|
|||
|
||||
// 위치 보정
|
||||
transform.position = targetPos;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Check_Hit(Collider2D collision)
|
||||
{
|
||||
if (m_ProjectileData.IsPC)
|
||||
{
|
||||
if (collision.tag == "Mob")
|
||||
{
|
||||
collision.GetComponent<MobActor>().Get_Dmg(m_ProjectileData.Dmg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (collision.tag == "Wall_HP")
|
||||
{
|
||||
IngameMgr.Ins.Get_Dmg(m_ProjectileData.Dmg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Projectile_Split(bool hitEnemy)
|
||||
|
|
@ -139,4 +159,5 @@ public class ProjectileData
|
|||
public Transform tf_Start;
|
||||
ObscuredBool _IsPC; public bool IsPC { get { return _IsPC; } set { _IsPC = value; _IsPC.RandomizeCryptoKey(); } }
|
||||
ObscuredInt _Lv; public int Lv { get { return _Lv; } set { _Lv = value; _Lv.RandomizeCryptoKey(); } }
|
||||
ObscuredInt _Dmg; public int Dmg { get { return _Dmg; } set { _Dmg = value; _Dmg.RandomizeCryptoKey(); } }
|
||||
}
|
||||
|
|
@ -11,9 +11,9 @@ public class MonsterTableData : TableDataBase
|
|||
{
|
||||
public eMonsterType e_MonsterType;
|
||||
ObscuredInt _MonsterTypeID; public int n_MonsterTypeID { get { return _MonsterTypeID; } set { _MonsterTypeID = value; _MonsterTypeID.RandomizeCryptoKey(); } }
|
||||
ObscuredFloat _DefaultAttack; public float f_DefaultAttack { get { return _DefaultAttack; } set { _DefaultAttack = value; _DefaultAttack.RandomizeCryptoKey(); } }
|
||||
ObscuredFloat _DefaultHp; public float f_DefaultHp { get { return _DefaultHp; } set { _DefaultHp = value; _DefaultHp.RandomizeCryptoKey(); } }
|
||||
ObscuredFloat _DropExp; public float n_DropExp { get { return _DropExp; } set { _DropExp = value; _DropExp.RandomizeCryptoKey(); } }
|
||||
ObscuredInt _DefaultAttack; public int n_DefaultAttack { get { return _DefaultAttack; } set { _DefaultAttack = value; _DefaultAttack.RandomizeCryptoKey(); } }
|
||||
ObscuredInt _DefaultHp; public int n_DefaultHp { get { return _DefaultHp; } set { _DefaultHp = value; _DefaultHp.RandomizeCryptoKey(); } }
|
||||
ObscuredInt _DropExp; public int n_DropExp { get { return _DropExp; } set { _DropExp = value; _DropExp.RandomizeCryptoKey(); } }
|
||||
|
||||
public eUnityType e_UnityType;
|
||||
ObscuredFloat _AttackRange; public float f_AttackRange { get { return _AttackRange; } set { _AttackRange = value; _AttackRange.RandomizeCryptoKey(); } }
|
||||
|
|
|
|||
|
|
@ -5,11 +5,8 @@ using System.Collections.Generic;
|
|||
public class UnitTableData : TableDataBase
|
||||
{
|
||||
ObscuredInt _UnitID; public int n_UnitID { get { return _UnitID; } set { _UnitID = value; _UnitID.RandomizeCryptoKey(); } }
|
||||
|
||||
ObscuredFloat _DefaultAttack; public float f_DefaultAttack { get { return _DefaultAttack; } set { _DefaultAttack = value; _DefaultAttack.RandomizeCryptoKey(); } }
|
||||
|
||||
ObscuredInt _DefaultAttack; public int n_DefaultAttack { get { return _DefaultAttack; } set { _DefaultAttack = value; _DefaultAttack.RandomizeCryptoKey(); } }
|
||||
ObscuredInt _DefaultHp; public int n_DefaultHp { get { return _DefaultHp; } set { _DefaultHp = value; _DefaultHp.RandomizeCryptoKey(); } }
|
||||
|
||||
ObscuredFloat _AttackSpeed; public float f_AttackSpeed { get { return _AttackSpeed; } set { _AttackSpeed = value; _AttackSpeed.RandomizeCryptoKey(); } }
|
||||
ObscuredInt _DefaultProjectileCount; public int n_DefaultProjectileCount { get { return _DefaultProjectileCount; } set { _DefaultProjectileCount = value; _DefaultProjectileCount.RandomizeCryptoKey(); } }
|
||||
ObscuredInt _ProjectileID; public int n_ProjectileID { get { return _ProjectileID; } set { _ProjectileID = value; _ProjectileID.RandomizeCryptoKey(); } }
|
||||
|
|
|
|||
Loading…
Reference in New Issue