diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..a5addf8 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 13eb702d3f0cbbd418ab2dd7b588e14b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/FloatingTextAnimation.anim b/Assets/Animations/FloatingTextAnimation.anim new file mode 100644 index 0000000..625d26e --- /dev/null +++ b/Assets/Animations/FloatingTextAnimation.anim @@ -0,0 +1,295 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: FloatingTextAnimation + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 1, y: 1, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1 + value: {x: 0.2, y: 0.2, z: 0.2} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Text (Legacy) + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchoredPosition.x + path: Text (Legacy) + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 50 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchoredPosition.y + path: Text (Legacy) + classID: 224 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 3763599388 + attribute: 3 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 3763599388 + attribute: 538195251 + script: {fileID: 0} + typeID: 224 + customType: 28 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 3763599388 + attribute: 1460864421 + script: {fileID: 0} + typeID: 224 + customType: 28 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchoredPosition.x + path: Text (Legacy) + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 50 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchoredPosition.y + path: Text (Legacy) + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.x + path: Text (Legacy) + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.y + path: Text (Legacy) + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.z + path: Text (Legacy) + classID: 224 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/FloatingTextAnimation.anim.meta b/Assets/Animations/FloatingTextAnimation.anim.meta new file mode 100644 index 0000000..37d5f74 --- /dev/null +++ b/Assets/Animations/FloatingTextAnimation.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 36a151da134da8e428d76d586653c6c0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/FloatingTextAnimator.controller b/Assets/Animations/FloatingTextAnimator.controller new file mode 100644 index 0000000..57d7bc0 --- /dev/null +++ b/Assets/Animations/FloatingTextAnimator.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1102 &-8752376183361602918 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: FloatingTextAnimation + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 36a151da134da8e428d76d586653c6c0, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: FloatingTextAnimator + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 255323769566786112} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1107 &255323769566786112 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -8752376183361602918} + m_Position: {x: 50, y: 180, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -8752376183361602918} diff --git a/Assets/Animations/FloatingTextAnimator.controller.meta b/Assets/Animations/FloatingTextAnimator.controller.meta new file mode 100644 index 0000000..5eb5a7c --- /dev/null +++ b/Assets/Animations/FloatingTextAnimator.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 28ee252a0c822fc49a1a90b24cb95abb +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Audio/gulp.mp3 b/Assets/Audio/gulp.mp3 new file mode 100644 index 0000000..28c443a Binary files /dev/null and b/Assets/Audio/gulp.mp3 differ diff --git a/Assets/Audio/gulp.mp3.meta b/Assets/Audio/gulp.mp3.meta new file mode 100644 index 0000000..4e2c278 --- /dev/null +++ b/Assets/Audio/gulp.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d9256230b21fa9649a81f9e8f8471858 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Buffs/HitPointBuff.prefab b/Assets/Prefabs/Buffs/HitPointBuff.prefab index b600502..8673eb8 100644 --- a/Assets/Prefabs/Buffs/HitPointBuff.prefab +++ b/Assets/Prefabs/Buffs/HitPointBuff.prefab @@ -56,6 +56,7 @@ MonoBehaviour: movementSpeedMultiplierBuff: 0 baseAttackRangeBuff: 0 attackRangeMultiplierBuff: 0 + buffTypes: 02000000 --- !u!54 &3578579234224482947 Rigidbody: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Buffs/RangeBuff.prefab b/Assets/Prefabs/Buffs/RangeBuff.prefab index 184dc94..60abee1 100644 --- a/Assets/Prefabs/Buffs/RangeBuff.prefab +++ b/Assets/Prefabs/Buffs/RangeBuff.prefab @@ -88,6 +88,7 @@ MonoBehaviour: movementSpeedMultiplierBuff: 0 baseAttackRangeBuff: 0.01 attackRangeMultiplierBuff: 0.02 + buffTypes: 0000000001000000 --- !u!54 &6724353180413059167 Rigidbody: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Buffs/SpeedBuff.prefab b/Assets/Prefabs/Buffs/SpeedBuff.prefab index 9721e78..8fa30ab 100644 --- a/Assets/Prefabs/Buffs/SpeedBuff.prefab +++ b/Assets/Prefabs/Buffs/SpeedBuff.prefab @@ -56,6 +56,7 @@ MonoBehaviour: movementSpeedMultiplierBuff: 0.01 baseAttackRangeBuff: 0 attackRangeMultiplierBuff: 0 + buffTypes: 03000000 --- !u!54 &4227791301383778843 Rigidbody: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Enemies/Boss.prefab b/Assets/Prefabs/Enemies/Boss.prefab index 3065b17..e425f3b 100644 --- a/Assets/Prefabs/Enemies/Boss.prefab +++ b/Assets/Prefabs/Enemies/Boss.prefab @@ -117,7 +117,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4e8ee19c6594fb44995e9be99b792976, type: 3} m_Name: m_EditorClassIdentifier: - initialHitPoints: 300 + initialHitPoints: 1000 maxRange: 5 minRange: 0 enemyType: 0 diff --git a/Assets/Prefabs/Enemies/Enemy.prefab b/Assets/Prefabs/Enemies/Enemy.prefab index a9d71ee..3438465 100644 --- a/Assets/Prefabs/Enemies/Enemy.prefab +++ b/Assets/Prefabs/Enemies/Enemy.prefab @@ -152,7 +152,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: initialHitPoints: 50 - maxRange: 1 + maxRange: 2 minRange: 0 enemyType: 0 deathEffectPrefab: {fileID: 1390118265774136416, guid: a17030364649a5944926716399bd79f7, type: 3} diff --git a/Assets/Prefabs/FloatingText.prefab b/Assets/Prefabs/FloatingText.prefab new file mode 100644 index 0000000..94dc655 --- /dev/null +++ b/Assets/Prefabs/FloatingText.prefab @@ -0,0 +1,266 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &447568330374579020 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5324389711825702197} + - component: {fileID: 2104627390132447484} + - component: {fileID: 912684518070665534} + - component: {fileID: 5236096453491067154} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5324389711825702197 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447568330374579020} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4825974650470439566} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2104627390132447484 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447568330374579020} + m_CullTransparentMesh: 1 +--- !u!114 &912684518070665534 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447568330374579020} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8745098, g: 0.16078432, b: 0.20784314, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 0e446559229638f448d0706b0656bbe0, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &5236096453491067154 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447568330374579020} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 1, g: 1, b: 1, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &1907699245600943604 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4825974650470439566} + - component: {fileID: 8532543957740818481} + - component: {fileID: 2814400045687422827} + - component: {fileID: 1739560474030555045} + - component: {fileID: 3460573454964742793} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4825974650470439566 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1907699245600943604} + m_LocalRotation: {x: -0, y: -0.9999999, z: -0, w: 0.00050868094} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5324389711825702197} + m_Father: {fileID: 5964903305613226832} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: -179.942, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 300, y: 40} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!223 &8532543957740818481 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1907699245600943604} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!114 &2814400045687422827 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1907699245600943604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 1 +--- !u!114 &1739560474030555045 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1907699245600943604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!95 &3460573454964742793 +Animator: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1907699245600943604} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 28ee252a0c822fc49a1a90b24cb95abb, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!1 &5964903305613226833 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5964903305613226832} + - component: {fileID: 5353872678894379532} + m_Layer: 0 + m_Name: FloatingText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5964903305613226832 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5964903305613226833} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.015, y: 0.015, z: 0.015} + m_ConstrainProportionsScale: 1 + m_Children: + - {fileID: 4825974650470439566} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5353872678894379532 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5964903305613226833} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: aba2804828b61574888daf5fc0f669ce, type: 3} + m_Name: + m_EditorClassIdentifier: + text: {fileID: 912684518070665534} diff --git a/Assets/Prefabs/FloatingText.prefab.meta b/Assets/Prefabs/FloatingText.prefab.meta new file mode 100644 index 0000000..d32085d --- /dev/null +++ b/Assets/Prefabs/FloatingText.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3e6770ff9b5bcea4890640572be4507b +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index 916c1a4..95ff09f 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -413,8 +413,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fb6a582212765b040a4042927b8af493, type: 3} m_Name: m_EditorClassIdentifier: - hitPoints: 0 - initialHitPoints: 100 --- !u!114 &-3976935303735240655 MonoBehaviour: m_ObjectHideFlags: 0 @@ -680,15 +678,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 207563730290847909, guid: 759c6a17a9b0f46478c36ce23600fce4, type: 3} propertyPath: m_LocalScale.x - value: 0.015 + value: 0.008 objectReference: {fileID: 0} - target: {fileID: 207563730290847909, guid: 759c6a17a9b0f46478c36ce23600fce4, type: 3} propertyPath: m_LocalScale.y - value: 0.015 + value: 0.008 objectReference: {fileID: 0} - target: {fileID: 207563730290847909, guid: 759c6a17a9b0f46478c36ce23600fce4, type: 3} propertyPath: m_LocalScale.z - value: 0.015 + value: 0.008 objectReference: {fileID: 0} - target: {fileID: 207563730290847909, guid: 759c6a17a9b0f46478c36ce23600fce4, type: 3} propertyPath: m_LocalPosition.x @@ -738,6 +736,10 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 207563730290847909, guid: 759c6a17a9b0f46478c36ce23600fce4, type: 3} + propertyPath: m_ConstrainProportionsScale + value: 1 + objectReference: {fileID: 0} - target: {fileID: 9132880458430860385, guid: 759c6a17a9b0f46478c36ce23600fce4, type: 3} propertyPath: m_LocalRotation.w value: 0 diff --git a/Assets/Scenes/MainScene.unity b/Assets/Scenes/MainScene.unity index f8c1de6..329705f 100644 --- a/Assets/Scenes/MainScene.unity +++ b/Assets/Scenes/MainScene.unity @@ -739,6 +739,7 @@ MonoBehaviour: chance: 0.25 - prefab: {fileID: 6724353180413059161, guid: f1a5ddd8653b52941b34911e403e9c05, type: 3} chance: 0.24 + floatingTextPrefab: {fileID: 5964903305613226833, guid: 3e6770ff9b5bcea4890640572be4507b, type: 3} isNavMeshBaked: 0 currentRoom: {fileID: 0} --- !u!114 &1524951598 @@ -785,6 +786,8 @@ MonoBehaviour: m_EditorClassIdentifier: musicAudioSource: {fileID: 1524951600} audioSettings: + gulpAudioClips: + - {fileID: 8300000, guid: d9256230b21fa9649a81f9e8f8471858, type: 3} npcDeathAudioClips: - {fileID: 8300000, guid: a31a2fe54b0256647b35682b2de79aac, type: 3} - {fileID: 8300000, guid: 2204296455ff86a47b5d3b7dff7317bf, type: 3} @@ -1534,7 +1537,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2932101238397256823, guid: 3b586217a958dcd42976ca69ca9e3ed3, type: 3} propertyPath: m_AnchoredPosition.y - value: 637.7245 + value: 756.13184 objectReference: {fileID: 0} - target: {fileID: 2932101238483661021, guid: 3b586217a958dcd42976ca69ca9e3ed3, type: 3} propertyPath: m_AnchorMax.x diff --git a/Assets/Scripts/DropScript.cs b/Assets/Scripts/DropScript.cs index b124266..2253283 100644 --- a/Assets/Scripts/DropScript.cs +++ b/Assets/Scripts/DropScript.cs @@ -1,17 +1,30 @@ +using System.Collections.Generic; using UnityEngine; #nullable enable +public enum BuffType +{ + attackRange, + damage, + hitpoints, + movementSpeed, +} + public class DropScript : MonoBehaviour { [SerializeField] PlayerBuffs playerBuffs = default!; + [SerializeField] + List buffTypes = new List(); void OnCollisionEnter(Collision collision) { if (collision.collider.name == "DropCollider") { - var playerScript = GameManagerScript.instance?.GetPlayerScript; + var manager = GameManagerScript.instance; + + var playerScript = manager?.GetPlayerScript; if (playerScript != null) { @@ -27,6 +40,43 @@ void OnCollisionEnter(Collision collision) buffs.attackRangeMultiplierBuff += playerBuffs.attackRangeMultiplierBuff; playerScript.TriggerUpdateStats(); + + int index = 0; + foreach (var item in buffTypes) + { + var text = ""; + var color = Color.white; + + switch (item) + { + case BuffType.attackRange: + text = "+ Alcance"; + color = Colors.spanishGreen; + break; + case BuffType.damage: + text = "+ Dano"; + color = Colors.orangePantone; + break; + case BuffType.hitpoints: + text = "+ Vida"; + color = Colors.roseMadder; + break; + case BuffType.movementSpeed: + text = "+ Velocidade"; + color = Colors.blueCrayola; + break; + } + + manager?.SpawnFloatingText( + transform.position + Vector3.up * index * .3f, + text, + color + ); + + SoundManagerScript.instance.PlayGulp(); + + index++; + } } Destroy(gameObject); diff --git a/Assets/Scripts/FloatingTextScript.cs b/Assets/Scripts/FloatingTextScript.cs new file mode 100644 index 0000000..e0acaed --- /dev/null +++ b/Assets/Scripts/FloatingTextScript.cs @@ -0,0 +1,36 @@ +using UnityEngine; +using UnityEngine.UI; + +#nullable enable + +public class FloatingTextScript : MonoBehaviour +{ + [SerializeField] + Text? text; + + public void UpdateColor(Color color) + { + if (text != null) + { + text.color = color; + } + } + + public void UpdateText(string newText) + { + if (text != null) + { + text.text = newText; + } + } + + void LateUpdate() + { + transform.LookAt(Camera.main.transform); + } + + void Start() + { + Destroy(gameObject, 1.1f); + } +} diff --git a/Assets/Scripts/FloatingTextScript.cs.meta b/Assets/Scripts/FloatingTextScript.cs.meta new file mode 100644 index 0000000..e82f6a8 --- /dev/null +++ b/Assets/Scripts/FloatingTextScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: aba2804828b61574888daf5fc0f669ce +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/GameManagerScript.cs b/Assets/Scripts/GameManagerScript.cs index 05981cd..03b3d56 100644 --- a/Assets/Scripts/GameManagerScript.cs +++ b/Assets/Scripts/GameManagerScript.cs @@ -12,6 +12,8 @@ public class GameManagerScript : MonoBehaviour EnemySpawnSettings enemySpawnSettings = default!; [SerializeField] EnemyDropSettings enemyDropSettings = default!; + [SerializeField] + GameObject? floatingTextPrefab; public bool isNavMeshBaked = false; @@ -56,7 +58,7 @@ public class GameManagerScript : MonoBehaviour public void AttemptEnemySpawn() { - // TODO: Terminar spawn do boss + currentRoom?.GetComponent()?.UpdateDifficulty(); if (currentRoom == null || visitedRooms.Contains(currentRoom)) { @@ -150,6 +152,22 @@ public void KillEnemy(GameObject enemy) Destroy(enemy); } + public void SpawnFloatingText(Vector3 position, string text, Color? color) + { + if (floatingTextPrefab != null) + { + var script = Instantiate(floatingTextPrefab, position + Vector3.up, Quaternion.identity) + .GetComponent(); + + script.UpdateText(text); + + if (color != null) + { + script.UpdateColor((Color)color!); + } + } + } + void Awake() { instance = this; diff --git a/Assets/Scripts/Models/AudioSettings.cs b/Assets/Scripts/Models/AudioSettings.cs index ff7601a..df05e91 100644 --- a/Assets/Scripts/Models/AudioSettings.cs +++ b/Assets/Scripts/Models/AudioSettings.cs @@ -6,10 +6,16 @@ [System.Serializable] class AudioSettings { + public List gulpAudioClips = default!; public List npcDeathAudioClips = default!; public List swordHitAudioClips = default!; public List swordSwingAudioClips = default!; + public AudioClip GetRandomGulpAudioClip() + { + return gulpAudioClips[Random.Range(0, gulpAudioClips.Count)]; + } + public AudioClip GetRandomNpcDeathAudioClip() { return npcDeathAudioClips[Random.Range(0, npcDeathAudioClips.Count)]; diff --git a/Assets/Scripts/PlayerScript.cs b/Assets/Scripts/PlayerScript.cs index f585d6e..f78e564 100644 --- a/Assets/Scripts/PlayerScript.cs +++ b/Assets/Scripts/PlayerScript.cs @@ -213,9 +213,17 @@ void HandleAttack() if (enemyScript != null) { - enemyDied = enemyScript.InflictDamage( - playerBuffs.baseDamageBuff * playerBuffs.damageMultiplierBuff - ); + var damage = + playerBuffs.baseDamageBuff * playerBuffs.damageMultiplierBuff; + + enemyDied = enemyScript.InflictDamage(damage); + + GameManagerScript.instance + .SpawnFloatingText( + collider.transform.position, + damage.ToString("0"), + null + ); } if (enemyDied) diff --git a/Assets/Scripts/RoomScript.cs b/Assets/Scripts/RoomScript.cs index 93cf493..0716c91 100644 --- a/Assets/Scripts/RoomScript.cs +++ b/Assets/Scripts/RoomScript.cs @@ -238,69 +238,84 @@ public void SpawnEnemies() settings.difficultyIndexWeight * settings.difficultyCurve.Evaluate(difficultyIndex / 20); - StatsScript.instance.UpdateDifficulty(difficultyIndex); - Debug.Log( $"Current room difficulty: {difficultyIndex}: {batchSize} enemies." ); + if (roomType == RoomType.boss) + { + var bossPrefab = settings.bossPrefab; + + SpawnEnemy(prefab: bossPrefab, manager: manager); + } + for (int i = 0; i < batchSize; i++) { var prefab = settings.GetRandomEnemyPrefab(); - var tries = 0; + SpawnEnemy(prefab: prefab, manager: manager); + } + } - while (true) - { - tries++; + void SpawnEnemy(GameObject prefab, GameManagerScript manager) + { + var tries = 0; - // Sistema de segurança para não cair em loop. - if (tries > 10) - { - break; - } + while (true) + { + tries++; - var vector2 = Random.insideUnitCircle * 10f; + // Sistema de segurança para não cair em loop. + if (tries > 10) + { + break; + } - var position = new Vector3( - x: vector2.x + transform.position.x, - y: 4f, - z: vector2.y + transform.position.z - ); + var vector2 = Random.insideUnitCircle * 10f; - RaycastHit hit; - if ( - !Physics.Raycast( - position, - Vector3.down, - out hit, - 10f, - Layers.geometryMask - ) + var position = new Vector3( + x: vector2.x + transform.position.x, + y: 4f, + z: vector2.y + transform.position.z + ); + + RaycastHit hit; + if ( + !Physics.Raycast( + position, + Vector3.down, + out hit, + 10f, + Layers.geometryMask ) - { - continue; - } + ) + { + continue; + } - // Não deixar o inimigo spawnar em cima de paredes. - if (hit.point.y > 1f) - { - continue; - } + // Não deixar o inimigo spawnar em cima de paredes. + if (hit.point.y > 1f) + { + continue; + } - var enemy = Instantiate( - prefab, - hit.point, - Quaternion.identity - ); + var enemy = Instantiate( + prefab, + hit.point, + Quaternion.identity + ); - manager.GetEnemies.Add(enemy); + manager.GetEnemies.Add(enemy); - break; - } + break; } } + public void UpdateDifficulty() + { + StatsScript.instance.UpdateDifficulty(difficultyIndex); + } + void Awake() { difficultyIndex = transform.position.magnitude; diff --git a/Assets/Scripts/SoundManagerScript.cs b/Assets/Scripts/SoundManagerScript.cs index 1e3e195..13b4c0e 100644 --- a/Assets/Scripts/SoundManagerScript.cs +++ b/Assets/Scripts/SoundManagerScript.cs @@ -14,6 +14,19 @@ public class SoundManagerScript : MonoBehaviour AudioSource? audioSource; + public void PlayGulp() + { + var volume = LocalPrefs.GetSFXVolume(); + + if (audioSource != null) + { + audioSource.PlayOneShot( + audioSettings.GetRandomGulpAudioClip(), + volume + ); + } + } + public void PlayNpcDeath() { var volume = LocalPrefs.GetSFXVolume(); diff --git a/Assets/Scripts/Utils/Colors.cs b/Assets/Scripts/Utils/Colors.cs new file mode 100644 index 0000000..cc88300 --- /dev/null +++ b/Assets/Scripts/Utils/Colors.cs @@ -0,0 +1,22 @@ +using UnityEngine; + +#nullable enable + +public static class Colors +{ + public static Color jet = Parse("#2A2826"); + public static Color roseMadder = Parse("#Df2935"); + public static Color blueCrayola = Parse("#3772FF"); + public static Color sunglow = Parse("#FDCA40"); + public static Color spanishGreen = Parse("#018E42"); + public static Color orangePantone = Parse("#FE5F00"); + + static Color Parse(string hex) + { + Color color; + + ColorUtility.TryParseHtmlString(hex, out color); + + return color; + } +} diff --git a/Assets/Scripts/Utils/Colors.cs.meta b/Assets/Scripts/Utils/Colors.cs.meta new file mode 100644 index 0000000..c258770 --- /dev/null +++ b/Assets/Scripts/Utils/Colors.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 08cce4d1671e4434291fd55f6e6629fd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/README.md b/README.md index 706306a..6922e82 100644 --- a/README.md +++ b/README.md @@ -12,17 +12,17 @@ -* [About](#about) -* [Built With](#built-with) -* [Getting Started](#getting-started) - + [Prerequisites](#prerequisites) -* [Resources](#resources) -* [License](#license) -* [Credits](#credits) - + [Music](#music) - + [SFX](#sfx) - + [Background](#background) -* [Members](#members) +- [About](#about) +- [Built With](#built-with) +- [Getting Started](#getting-started) + - [Prerequisites](#prerequisites) +- [Resources](#resources) +- [License](#license) +- [Credits](#credits) + - [Music](#music) + - [SFX](#sfx) + - [Background](#background) +- [Members](#members) ## About @@ -82,6 +82,7 @@ Special thanks to [prod. ayc](https://www.youtube.com/channel/UC06oKQ_VOHjSXtXnU * https://freesound.org/people/tonsil5/sounds/555411/ * https://freesound.org/people/scorpion67890/sounds/614315/ * https://freesound.org/people/spookymodem/sounds/249813/ +* https://freesound.org/people/swordofkings128/sounds/397611/ ### Background