From 42706712aa578f744d59ff87fb5f921adfe3ece8 Mon Sep 17 00:00:00 2001 From: trotFunky Date: Thu, 19 Sep 2019 12:36:09 +0200 Subject: [PATCH] Implemented shooting Fixed abstract character not depleting energy when reaching zero Created prefabs for player and enemy bullets Added physics layers for players and enemies --- Assets/Prefabs/EnemyBullet.prefab | 128 ++++++++++++++++++++++++ Assets/Prefabs/EnemyBullet.prefab.meta | 7 ++ Assets/Prefabs/Player.prefab | 9 +- Assets/Prefabs/PlayerBullet.prefab | 128 ++++++++++++++++++++++++ Assets/Prefabs/PlayerBullet.prefab.meta | 7 ++ Assets/Scenes/SampleScene.unity | 5 - Assets/Scripts/AbstractCharacter.cs | 6 +- Assets/Scripts/AbstractShooter.cs | 49 ++++++++- Assets/Scripts/BasicShooter.cs | 21 +++- Assets/Scripts/Bullet.cs | 6 -- Assets/Scripts/PlayerCharacter.cs | 12 ++- Assets/Sprites/Bullet.png | Bin 0 -> 2979 bytes Assets/Sprites/Bullet.png.meta | 103 +++++++++++++++++++ ProjectSettings/Physics2DSettings.asset | 2 +- ProjectSettings/TagManager.asset | 4 +- 15 files changed, 458 insertions(+), 29 deletions(-) create mode 100644 Assets/Prefabs/EnemyBullet.prefab create mode 100644 Assets/Prefabs/EnemyBullet.prefab.meta create mode 100644 Assets/Prefabs/PlayerBullet.prefab create mode 100644 Assets/Prefabs/PlayerBullet.prefab.meta create mode 100644 Assets/Sprites/Bullet.png create mode 100644 Assets/Sprites/Bullet.png.meta diff --git a/Assets/Prefabs/EnemyBullet.prefab b/Assets/Prefabs/EnemyBullet.prefab new file mode 100644 index 0000000..2141f6a --- /dev/null +++ b/Assets/Prefabs/EnemyBullet.prefab @@ -0,0 +1,128 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7819471670070814049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7819471670070814054} + - component: {fileID: 7819471670070814053} + - component: {fileID: 7819471670070814052} + - component: {fileID: 7819471670070814051} + - component: {fileID: 7819471670070814050} + m_Layer: 9 + m_Name: EnemyBullet + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7819471670070814054 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7819471670070814049} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3.11, y: -0.15, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &7819471670070814053 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7819471670070814049} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + 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_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: 3b4cae76f20a7b6238d5eb0109a2b8d4, type: 3} + m_Color: {r: 1, g: 0.14117648, b: 0.23921569, a: 1} + 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_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!58 &7819471670070814052 +CircleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7819471670070814049} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 + m_Radius: 0.2 +--- !u!114 &7819471670070814051 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7819471670070814049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8d0d4226322cf15c8b3f89217d9b1c66, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &7819471670070814050 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7819471670070814049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 88e019f69c8f40971acaa53093cfe4dd, type: 3} + m_Name: + m_EditorClassIdentifier: + _damage: 1 + _speed: 5 + _direction: {x: 1, y: 0} diff --git a/Assets/Prefabs/EnemyBullet.prefab.meta b/Assets/Prefabs/EnemyBullet.prefab.meta new file mode 100644 index 0000000..607787a --- /dev/null +++ b/Assets/Prefabs/EnemyBullet.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d562dc003000623c3a481b16e746d1a5 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index d86428d..17e2e67 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -15,7 +15,7 @@ GameObject: - component: {fileID: 2690590977808455802} - component: {fileID: 2690590977808455803} - component: {fileID: 2690590977808455796} - m_Layer: 0 + m_Layer: 8 m_Name: Player m_TagString: Untagged m_Icon: {fileID: 0} @@ -113,7 +113,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 35183fd85dde156de82c2af47fea6156, type: 3} m_Name: m_EditorClassIdentifier: - _maxSpeed: 10 + _maxSpeed: 7 _maxHealth: 3 _maxEnergy: 100 _energyRegen: 20 @@ -153,3 +153,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61bf45c54c3d922598ce965db2dc869c, type: 3} m_Name: m_EditorClassIdentifier: + _energyCost: 10 + _shotsPerSecond: 2 + _bullet: {fileID: 4369719273071165554, guid: 5dcbc4e2919ffde8a9d89514fd293e8e, type: 3} + _direction: {x: 1, y: 0} + _offset: {x: 1, y: 0} diff --git a/Assets/Prefabs/PlayerBullet.prefab b/Assets/Prefabs/PlayerBullet.prefab new file mode 100644 index 0000000..4a408e7 --- /dev/null +++ b/Assets/Prefabs/PlayerBullet.prefab @@ -0,0 +1,128 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4369719273071165554 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4369719273071165557} + - component: {fileID: 4369719273071165558} + - component: {fileID: 4369719273071165559} + - component: {fileID: 4369719273071165552} + - component: {fileID: 4369719273071165553} + m_Layer: 8 + m_Name: PlayerBullet + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4369719273071165557 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4369719273071165554} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3.11, y: -0.15, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &4369719273071165558 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4369719273071165554} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + 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_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: 3b4cae76f20a7b6238d5eb0109a2b8d4, type: 3} + m_Color: {r: 0.16981131, g: 1, b: 0.2012984, a: 1} + 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_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!58 &4369719273071165559 +CircleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4369719273071165554} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 + m_Radius: 0.2 +--- !u!114 &4369719273071165552 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4369719273071165554} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8d0d4226322cf15c8b3f89217d9b1c66, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &4369719273071165553 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4369719273071165554} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 88e019f69c8f40971acaa53093cfe4dd, type: 3} + m_Name: + m_EditorClassIdentifier: + _damage: 1 + _speed: 5 + _direction: {x: 1, y: 0} diff --git a/Assets/Prefabs/PlayerBullet.prefab.meta b/Assets/Prefabs/PlayerBullet.prefab.meta new file mode 100644 index 0000000..2273622 --- /dev/null +++ b/Assets/Prefabs/PlayerBullet.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5dcbc4e2919ffde8a9d89514fd293e8e +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 1440b88..63d4d68 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -270,10 +270,5 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 2690590977808455797, guid: 3ae3c84bd570eb26d86ed9ec4e5fcba0, - type: 3} - propertyPath: _maxSpeed - value: 7 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 3ae3c84bd570eb26d86ed9ec4e5fcba0, type: 3} diff --git a/Assets/Scripts/AbstractCharacter.cs b/Assets/Scripts/AbstractCharacter.cs index 3c790cc..1875216 100644 --- a/Assets/Scripts/AbstractCharacter.cs +++ b/Assets/Scripts/AbstractCharacter.cs @@ -78,13 +78,17 @@ public abstract class AbstractCharacter : MonoBehaviour _isDepleted = false; } } - if (CurrentEnergy < 0) + if (CurrentEnergy <= 0) { CurrentEnergy = 0; + _isDepleted = true; } // The InputManager is executed before and updates it to true if needed _isShooting = false; + + // FIXME : Debug drawing to show energy level + Debug.DrawLine(new Vector3(-5,4), new Vector3(-5 + 10 * CurrentEnergy/MaxEnergy,4),Color.blue); } public abstract void Move(Vector2 movementDirection); diff --git a/Assets/Scripts/AbstractShooter.cs b/Assets/Scripts/AbstractShooter.cs index a44c212..9c41aae 100644 --- a/Assets/Scripts/AbstractShooter.cs +++ b/Assets/Scripts/AbstractShooter.cs @@ -1,18 +1,57 @@ -using System.Collections; +using System; +using System.Collections; using System.Collections.Generic; using UnityEngine; -public class AbstractShooter : MonoBehaviour +public abstract class AbstractShooter : MonoBehaviour { + // Energy consumed per shot + [SerializeField] protected float _energyCost = 2; + public float EnergyCost => _energyCost; + + // Minimum time between two shots + protected float _minDeltaTime = 1f / 5; + + [SerializeField] private int _shotsPerSecond = 5; + public int ShotsPerSecond + { + get { return _shotsPerSecond; } + set + { + _shotsPerSecond = value; + _minDeltaTime = 1f / _shotsPerSecond; + } + } + + private float _timeLeft; + // Start is called before the first frame update void Start() { - + _minDeltaTime = 1f / ShotsPerSecond; + _timeLeft = 0; } - // Update is called once per frame void Update() { - + _timeLeft -= Time.deltaTime; } + + private void OnValidate() + { + _minDeltaTime = 1f / ShotsPerSecond; + } + + public bool Shoot(float currentEnergy) + { + if (_timeLeft <= 0 && currentEnergy > 0) + { + InstantiateProjectiles(); + _timeLeft = _minDeltaTime; + return true; + } + + return false; + } + protected abstract void InstantiateProjectiles(); } diff --git a/Assets/Scripts/BasicShooter.cs b/Assets/Scripts/BasicShooter.cs index a4df3d7..9e0af9b 100644 --- a/Assets/Scripts/BasicShooter.cs +++ b/Assets/Scripts/BasicShooter.cs @@ -4,15 +4,26 @@ using UnityEngine; public class BasicShooter : AbstractShooter { - // Start is called before the first frame update + // Bullet that will be fired + [SerializeField] private GameObject _bullet; + + private Transform _parentTransform; + + // Direction the bullet will be going + [SerializeField] private Vector2 _direction = Vector2.right; + + // Offset between parent and newly created bullet + [SerializeField] private Vector2 _offset = Vector2.zero; + void Start() { - + _parentTransform = GetComponentInParent(); } - // Update is called once per frame - void Update() + protected override void InstantiateProjectiles() { - + Vector3 newPosition = _parentTransform.position + (Vector3)_offset; + GameObject child = Instantiate(_bullet, newPosition, Quaternion.identity); + child.GetComponent().Direction = _direction; } } diff --git a/Assets/Scripts/Bullet.cs b/Assets/Scripts/Bullet.cs index 69bf192..e142cce 100644 --- a/Assets/Scripts/Bullet.cs +++ b/Assets/Scripts/Bullet.cs @@ -35,12 +35,6 @@ public class Bullet : MonoBehaviour mover.MaxSpeed = Speed; } - // Update is called once per frame - void Update() - { - - } - // Destroy on Stay, collision effects should be handled on Enter private void OnCollisionStay2D(Collision2D other) { diff --git a/Assets/Scripts/PlayerCharacter.cs b/Assets/Scripts/PlayerCharacter.cs index b11ed6b..c23377d 100644 --- a/Assets/Scripts/PlayerCharacter.cs +++ b/Assets/Scripts/PlayerCharacter.cs @@ -12,8 +12,16 @@ public class PlayerCharacter : AbstractCharacter public override void Shoot() { - // TODO : Implement - throw new System.NotImplementedException(); + _isShooting = true; + if (!_isDepleted && _shooter.Shoot(CurrentEnergy)) + { + CurrentEnergy -= _shooter.EnergyCost; + } + else if (_isDepleted) + { + // Force regen when depleted even if holding the trigger + _isShooting = false; + } } protected override void Death() diff --git a/Assets/Sprites/Bullet.png b/Assets/Sprites/Bullet.png new file mode 100644 index 0000000000000000000000000000000000000000..6114aff33307e748b6c305fef768c5cce0120098 GIT binary patch literal 2979 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 Z0|2sP7oud&nV|px002ovPDHLkV1n}jsImY6 literal 0 HcmV?d00001 diff --git a/Assets/Sprites/Bullet.png.meta b/Assets/Sprites/Bullet.png.meta new file mode 100644 index 0000000..c13cf37 --- /dev/null +++ b/Assets/Sprites/Bullet.png.meta @@ -0,0 +1,103 @@ +fileFormatVersion: 2 +guid: 3b4cae76f20a7b6238d5eb0109a2b8d4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 10 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 0 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset index 31e124d..b110650 100644 --- a/ProjectSettings/Physics2DSettings.asset +++ b/ProjectSettings/Physics2DSettings.asset @@ -53,4 +53,4 @@ Physics2DSettings: m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffdffcffffffffffffffffffffdffeffffdffdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 1c92a78..eec2bfa 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -13,8 +13,8 @@ TagManager: - UI - - - - - - + - Player + - Enemy - - -