그 보스 페이즈? 노션 보고 잘 만들어주세요

TMP는 깃에서 없애야 하는데 저 할 줄 모르니까
알아서 잘 해보시고
어자피 프로젝트 크기 5메가바이트도 안 넘으니까
굳이굳이 할 필요 없으심
즐
전 자러감ㅋㅋ
This commit is contained in:
김도환
2026-05-09 00:14:27 +09:00
parent f1213cd247
commit c5421de715
59 changed files with 817 additions and 242 deletions

3
.gitignore vendored
View File

@@ -75,3 +75,6 @@ crashlytics-build.properties
/[Aa]ssets/[Ss]treamingAssets/aa/*
# End of https://www.toptal.com/developers/gitignore/api/unity
/Assets/Sprites/ShouldNotBeUsed
/Assets/TextMesh Pro
/Assets/Fonts

8
Assets/Fonts.meta Normal file
View File

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

8
Assets/Prefabs.meta Normal file
View File

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

View File

@@ -0,0 +1,154 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5921252368867129526
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2061320151633347195}
- component: {fileID: 1797540837772257342}
- component: {fileID: 490763327940191773}
- component: {fileID: 1152076818425219994}
m_Layer: 9
m_Name: TunaP1Attacker
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2061320151633347195
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5921252368867129526}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -4.3426, y: 0.67107, z: 0}
m_LocalScale: {x: 0.05, y: 0.05, z: 0.05}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &1797540837772257342
SpriteRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5921252368867129526}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_Sprite: {fileID: -2413806693520163455, guid: a86470a33a6bf42c4b3595704624658b, type: 3}
m_Color: {r: 1, g: 0, b: 0, a: 0.30980393}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0
--- !u!61 &490763327940191773
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5921252368867129526}
m_Enabled: 1
serializedVersion: 3
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_CompositeOperation: 0
m_CompositeOrder: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!114 &1152076818425219994
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5921252368867129526}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bdb9c585da578ee408fc4177ce2010e1, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Unicorn.Hitbox.UnicornHitbox
attackData: {fileID: 0}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6db1d20b24524e6449e79fcc39f40401
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1027,6 +1027,163 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1132170011
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1132170015}
- component: {fileID: 1132170014}
- component: {fileID: 1132170013}
- component: {fileID: 1132170016}
m_Layer: 0
m_Name: Boss
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!50 &1132170013
Rigidbody2D:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1132170011}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDamping: 0
m_AngularDamping: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!212 &1132170014
SpriteRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1132170011}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_Sprite: {fileID: 21300000, guid: bf6d243c5f47f004fa08d89758c6bc0e, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.9531249, y: 1.9531249}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0
--- !u!4 &1132170015
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1132170011}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 4.3, y: -3.161, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!70 &1132170016
CapsuleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1132170011}
m_Enabled: 1
serializedVersion: 3
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_CompositeOperation: 0
m_CompositeOrder: 0
m_Offset: {x: -0.022632074, y: -0.077068515}
m_Size: {x: 1.9644431, y: 1.6619875}
m_Direction: 1
--- !u!1 &1291505767
GameObject:
m_ObjectHideFlags: 0
@@ -1060,6 +1217,158 @@ Transform:
- {fileID: 1472544505}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1319959501
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1319959505}
- component: {fileID: 1319959504}
- component: {fileID: 1319959503}
- component: {fileID: 1319959502}
m_Layer: 9
m_Name: Circle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1319959502
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319959501}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bdb9c585da578ee408fc4177ce2010e1, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Unicorn.Hitbox.UnicornHitbox
attackData: {fileID: 0}
--- !u!61 &1319959503
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319959501}
m_Enabled: 1
serializedVersion: 3
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_CompositeOperation: 0
m_CompositeOrder: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!212 &1319959504
SpriteRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319959501}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_Sprite: {fileID: -2413806693520163455, guid: a86470a33a6bf42c4b3595704624658b, type: 3}
m_Color: {r: 1, g: 0, b: 0, a: 0.30980393}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0
--- !u!4 &1319959505
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319959501}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -4.3426, y: 0.67107, z: 0}
m_LocalScale: {x: 0.05, y: 0.05, z: 0.05}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1398908073
GameObject:
m_ObjectHideFlags: 0
@@ -1480,3 +1789,5 @@ SceneRoots:
- {fileID: 68822293}
- {fileID: 1523163457}
- {fileID: 1291505768}
- {fileID: 1132170015}
- {fileID: 1319959505}

View File

@@ -0,0 +1,71 @@
using System.Collections;
using System.Collections.Generic;
using Unicorn.Hitbox;
using UnityEngine;
using NotImplementedException = System.NotImplementedException;
namespace Unicorn.Boss
{
internal enum UnicornPhase
{
Start, P1, P2, P3, End
}
public class Tuna : LivingEntity
{
private UnicornPhase _unicornPhase = UnicornPhase.Start;
private Queue<GameObject> _p1Ps = new Queue<GameObject>();
private const float P1PC = 12;
public Transform projContainer;
public GameObject phase1Proj;
private void Start()
{
StartCoroutine(Started());
}
private IEnumerator Started()
{
while (_p1Ps.Count < 50)
{
for (var i = 0; i < 5 && _p1Ps.Count < 50; i++) //프레임당 5개씩 생성
{
var instantiate = Instantiate(phase1Proj, projContainer);
_p1Ps.Enqueue(instantiate);
instantiate.SetActive(false);
}
yield return new WaitForEndOfFrame();
}
StartCoroutine(Phase1());
}
private void FixedUpdate()
{
}
private IEnumerator Phase1()
{
_unicornPhase = UnicornPhase.P1;
for (int i = 0; i < 360 / P1PC; i++)
{
var dequeue = _p1Ps.Dequeue();
dequeue.SetActive(true);
dequeue.transform.position = transform.position;
var rotationEulerAngles = transform.rotation.eulerAngles;
rotationEulerAngles.z += (360 / P1PC) * i;
dequeue.transform.rotation = Quaternion.Euler(rotationEulerAngles);
_p1Ps.Enqueue(dequeue);
}
yield return new WaitForSeconds(5);
StartCoroutine(Phase1());
}
protected override void OnKnockback(DamageInfo info)
{
//No KnockBack
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 0f3078fdd3458bf459c4463291b07499

View File

@@ -1,14 +0,0 @@
using Unicorn.Game.Hitbox;
using UnityEngine;
namespace Unicorn.Game
{
public class Enemy : LivingEntity
{
protected override void OnDamaged(DamageInfo info)
{
var dir = transform.position - info.hitPoint;
Rb.linearVelocity = dir.normalized * info.knockbackForce;
}
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 63fc82d3df1a3164584e678e0f04f817

View File

@@ -1,11 +1,11 @@
using UnityEngine;
namespace Unicorn.Game.Hitbox
namespace Unicorn.Hitbox
{
public struct DamageInfo
{
public float damage;
public float knockbackForce;
public Vector3 hitPoint; // 넉백 방향 계산을 위해 필요
public float Damage;
public float KnockbackForce;
public Vector3 HitPoint; // 넉백 방향 계산을 위해 필요
}
}

View File

@@ -1,9 +1,9 @@
using UnityEngine;
namespace Unicorn.Game.Hitbox
namespace Unicorn.Hitbox
{
[CreateAssetMenu(fileName = "NewAttackData", menuName = "Unicorn/AttackData")]
public class UnicornAttackDataSO: ScriptableObject
public class UnicornAttackDataSObj: ScriptableObject
{
public float damage;
public float knockbackForce;

View File

@@ -1,19 +1,19 @@
using UnityEngine;
namespace Unicorn.Game.Hitbox
namespace Unicorn.Hitbox
{
public class UnicornHitbox : MonoBehaviour
{
public UnicornAttackDataSO attackData;
public UnicornAttackDataSObj attackData;
private void OnTriggerEnter2D(Collider2D other)
{
if (!other.TryGetComponent(out LivingEntity target)) return;
var info = new DamageInfo
{
damage = attackData.damage,
knockbackForce = attackData.knockbackForce,
hitPoint = transform.position
Damage = attackData.damage,
KnockbackForce = attackData.knockbackForce,
HitPoint = transform.position
};
target.Damage(info);

View File

@@ -1,45 +1,45 @@
using Unicorn.Game.Hitbox;
using Unicorn.Hitbox;
using UnityEngine;
using NotImplementedException = System.NotImplementedException;
namespace Unicorn.Game
namespace Unicorn
{
public partial class LivingEntity : MonoBehaviour
{
private Rigidbody2D _rb;
public float health = 20.0f;
private Rigidbody2D Rb { get; set; }
private bool _invulnerable = false;
private void Start()
{
_rb = TryGetComponent(out Rigidbody2D rb) ? rb : null;
Rb = TryGetComponent(out Rigidbody2D rb) ? rb : null;
}
private void OnTriggerEnter2D(Collider2D other)
{
if (_rb == null) return;
if (Rb == null) return;
var transformPosition = other.transform.position - transform.position;
_rb.linearVelocity = Vector2.zero;
_rb.AddForce(transformPosition.normalized * health, ForceMode2D.Impulse);
Rb.linearVelocity = Vector2.zero;
Rb.AddForce(transformPosition.normalized * health, ForceMode2D.Impulse);
}
public void Damage(DamageInfo info)
{
health -= info.damage;
if (_invulnerable) return;
health -= info.Damage;
OnDamaged(info);
if (health <= 0.0f) OnDeath();
}
protected virtual void OnDeath()
{
throw new NotImplementedException();
}
protected virtual void OnDeath() { }
public Rigidbody2D Rb => _rb;
protected virtual void OnDamaged(DamageInfo info)
protected virtual void OnDamaged(DamageInfo info) { }
protected virtual void OnKnockback(DamageInfo info)
{
throw new NotImplementedException();
var dir = transform.position - info.HitPoint;
Rb.AddForce(dir.normalized * info.KnockbackForce, ForceMode2D.Impulse);
}
}
}

View File

@@ -1,7 +1,7 @@
using Unicorn.Game.Hitbox;
using Unicorn.Hitbox;
using UnityEngine;
namespace Unicorn.Game.Player
namespace Unicorn.Player
{
public class Player: LivingEntity
{

View File

@@ -3,7 +3,7 @@ using Unicorn.System;
using UnityEngine;
using UnityEngine.InputSystem;
namespace Unicorn.Game.Player
namespace Unicorn.Player
{
public class PlayerAttack: MonoBehaviour
{

View File

@@ -3,7 +3,7 @@ using Unicorn.System;
using UnityEngine;
using UnityEngine.InputSystem;
namespace Unicorn.Game.Player
namespace Unicorn.Player
{
public class PlayerMovement : MonoBehaviour
{

View File

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

View File

@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4de4d4a74d5b4258863a8173560a93ab, type: 3}
m_Name: TunaP1
m_EditorClassIdentifier: Assembly-CSharp::Unicorn.Hitbox.UnicornAttackDataSObj
damage: 1
knockbackForce: 5

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b6eb28167ca507f4097a624f0cc29d54
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class Benchmark01 : MonoBehaviour

View File

@@ -1,9 +1,9 @@
using UnityEngine;
using System.Collections;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class Benchmark01_UGUI : MonoBehaviour

View File

@@ -1,8 +1,7 @@
using TMPro;
using UnityEngine;
using System.Collections;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class Benchmark02 : MonoBehaviour

View File

@@ -1,9 +1,8 @@
using UnityEngine;
using System.Collections;
using TMPro;
using UnityEngine;
using UnityEngine.TextCore.LowLevel;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class Benchmark03 : MonoBehaviour

View File

@@ -1,8 +1,7 @@
using TMPro;
using UnityEngine;
using System.Collections;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class Benchmark04 : MonoBehaviour

View File

@@ -1,8 +1,6 @@
using UnityEngine;
using System.Collections;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class CameraController : MonoBehaviour

View File

@@ -1,7 +1,9 @@
using UnityEngine;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class ChatController : MonoBehaviour {
@@ -49,3 +51,4 @@ public class ChatController : MonoBehaviour {
}
}
}

View File

@@ -1,6 +1,8 @@
using TMPro;
using UnityEngine;
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class DropdownSample: MonoBehaviour
{
[SerializeField]
@@ -17,3 +19,4 @@ public class DropdownSample: MonoBehaviour
text.text = dropdownWithPlaceholder.value > -1 ? "Selected values:\n" + dropdownWithoutPlaceholder.value + " - " + dropdownWithPlaceholder.value : "Error: Please make a selection";
}
}
}

View File

@@ -1,7 +1,9 @@
using UnityEngine;
using System.Collections;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class EnvMapAnimator : MonoBehaviour {
//private Vector3 TranslationSpeeds;
@@ -33,3 +35,4 @@ public class EnvMapAnimator : MonoBehaviour {
}
}
}
}

View File

@@ -1,8 +1,6 @@
using UnityEngine;
using System.Collections;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class ObjectSpin : MonoBehaviour

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class ShaderPropAnimator : MonoBehaviour

View File

@@ -1,8 +1,7 @@
using UnityEngine;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class SimpleScript : MonoBehaviour

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class SkewTextExample : MonoBehaviour

View File

@@ -1,8 +1,7 @@
using UnityEngine;
using System;
using System;
using TMPro;
namespace TMPro
namespace TextMesh_Pro.Examples___Extras.Scripts
{
/// <summary>
/// EXample of a Custom Character Input Validator to only allow digits from 0 to 9.

View File

@@ -1,10 +1,7 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using TMPro;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TMP_ExampleScript_01 : MonoBehaviour

View File

@@ -1,8 +1,7 @@
using UnityEngine;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TMP_FrameRateCounter : MonoBehaviour

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using System;
using System;
using TMPro;
using UnityEngine;
namespace TMPro
namespace TextMesh_Pro.Examples___Extras.Scripts
{
/// <summary>
/// Example of a Custom Character Input Validator to only allow phone number in the (800) 555-1212 format.

View File

@@ -1,7 +1,7 @@
using UnityEngine;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TMP_TextEventCheck : MonoBehaviour
{

View File

@@ -1,10 +1,10 @@
using UnityEngine;
using System;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using System;
namespace TMPro
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TMP_TextEventHandler : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler

View File

@@ -1,10 +1,9 @@
using System;
using UnityEngine;
using System.Collections;
using TMPro;
using UnityEditor;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TMP_TextInfoDebugTool : MonoBehaviour

View File

@@ -1,9 +1,8 @@
using UnityEngine;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using System.Collections;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TMP_TextSelector_A : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler

View File

@@ -1,13 +1,10 @@
using UnityEngine;
using UnityEngine.Events;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using System.Collections;
using System.Collections.Generic;
#pragma warning disable 0618 // Disabled warning due to SetVertices being deprecated until new release with SetMesh() is available.
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TMP_TextSelector_B : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler, IPointerUpHandler

View File

@@ -1,8 +1,7 @@
using UnityEngine;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TMP_UiFrameRateCounter : MonoBehaviour

View File

@@ -1,8 +1,7 @@
using UnityEngine;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TMPro_InstructionOverlay : MonoBehaviour

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TeleType : MonoBehaviour

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TextConsoleSimulator : MonoBehaviour
{

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TextMeshProFloatingText : MonoBehaviour

View File

@@ -1,8 +1,7 @@
using TMPro;
using UnityEngine;
using System.Collections;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class TextMeshSpawner : MonoBehaviour

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class VertexColorCycler : MonoBehaviour

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class VertexJitter : MonoBehaviour

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class VertexShakeA : MonoBehaviour

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class VertexShakeB : MonoBehaviour

View File

@@ -1,10 +1,9 @@
using UnityEngine;
using System.Linq;
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class VertexZoom : MonoBehaviour

View File

@@ -1,8 +1,8 @@
using UnityEngine;
using System.Collections;
using System.Collections;
using TMPro;
using UnityEngine;
namespace TMPro.Examples
namespace TextMesh_Pro.Examples___Extras.Scripts
{
public class WarpTextExample : MonoBehaviour