Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b15dbb593 |
@@ -1,181 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &7192111562784377269
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 7306069853192956541}
|
|
||||||
- component: {fileID: 6956675740950355391}
|
|
||||||
- component: {fileID: 3724765237708177526}
|
|
||||||
- component: {fileID: 8790759452092966400}
|
|
||||||
- component: {fileID: 6076434776385846704}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: FastFucker
|
|
||||||
m_TagString: Ratbot
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &7306069853192956541
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7192111562784377269}
|
|
||||||
serializedVersion: 2
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0.45, y: 0.45, z: 0.45}
|
|
||||||
m_ConstrainProportionsScale: 1
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!212 &6956675740950355391
|
|
||||||
SpriteRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7192111562784377269}
|
|
||||||
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_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_SortingLayerID: 0
|
|
||||||
m_SortingLayer: 0
|
|
||||||
m_SortingOrder: 1
|
|
||||||
m_Sprite: {fileID: -3751497128136096670, guid: 520c934c186517356929c5948597af6f, type: 3}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_FlipX: 0
|
|
||||||
m_FlipY: 0
|
|
||||||
m_DrawMode: 0
|
|
||||||
m_Size: {x: 5.12, y: 5.12}
|
|
||||||
m_AdaptiveModeThreshold: 0.5
|
|
||||||
m_SpriteTileMode: 0
|
|
||||||
m_WasSpriteAssigned: 1
|
|
||||||
m_MaskInteraction: 0
|
|
||||||
m_SpriteSortPoint: 0
|
|
||||||
--- !u!114 &3724765237708177526
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7192111562784377269}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 07603fdf7ab38f05493e2a22ef5cae06, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
moveSpeed: 1500
|
|
||||||
damageStrength: 10
|
|
||||||
damageTimeoutSeconds: 0.5
|
|
||||||
health: 10
|
|
||||||
--- !u!61 &8790759452092966400
|
|
||||||
BoxCollider2D:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7192111562784377269}
|
|
||||||
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: 3.53, y: 4.2}
|
|
||||||
newSize: {x: 5.12, y: 5.12}
|
|
||||||
adaptiveTilingThreshold: 0.5
|
|
||||||
drawMode: 0
|
|
||||||
adaptiveTiling: 0
|
|
||||||
m_AutoTiling: 0
|
|
||||||
m_Size: {x: 3.53, y: 4.2}
|
|
||||||
m_EdgeRadius: 0
|
|
||||||
--- !u!50 &6076434776385846704
|
|
||||||
Rigidbody2D:
|
|
||||||
serializedVersion: 5
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7192111562784377269}
|
|
||||||
m_BodyType: 0
|
|
||||||
m_Simulated: 1
|
|
||||||
m_UseFullKinematicContacts: 0
|
|
||||||
m_UseAutoMass: 0
|
|
||||||
m_Mass: 0.2
|
|
||||||
m_LinearDamping: 15
|
|
||||||
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: 4
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 2c67a9ffe3cbdc6989fcabe398ffd2dc
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
@@ -1,143 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: e702bce75f9e4df8ea233b25756258da
|
|
||||||
TextureImporter:
|
|
||||||
internalIDToNameTable:
|
|
||||||
- first:
|
|
||||||
213: 6013433716489236182
|
|
||||||
second: pngtree-weapon-gun-flat-icon-handgun-png-image_4933503_0
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 13
|
|
||||||
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
|
|
||||||
flipGreenChannel: 0
|
|
||||||
isReadable: 0
|
|
||||||
streamingMipmaps: 0
|
|
||||||
streamingMipmapsPriority: 0
|
|
||||||
vTOnly: 0
|
|
||||||
ignoreMipmapLimit: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: 1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: 1
|
|
||||||
aniso: 1
|
|
||||||
mipBias: 0
|
|
||||||
wrapU: 1
|
|
||||||
wrapV: 1
|
|
||||||
wrapW: 1
|
|
||||||
nPOTScale: 0
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 2
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 1
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 8
|
|
||||||
textureShape: 1
|
|
||||||
singleChannelComponent: 0
|
|
||||||
flipbookRows: 1
|
|
||||||
flipbookColumns: 1
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
ignorePngGamma: 0
|
|
||||||
applyGammaDecoding: 0
|
|
||||||
swizzle: 50462976
|
|
||||||
cookieLightType: 0
|
|
||||||
platformSettings:
|
|
||||||
- serializedVersion: 4
|
|
||||||
buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 4
|
|
||||||
buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites:
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: pngtree-weapon-gun-flat-icon-handgun-png-image_4933503_0
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 37
|
|
||||||
y: 88
|
|
||||||
width: 286
|
|
||||||
height: 184
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: 6dea2b7ca12047350800000000000000
|
|
||||||
internalID: 6013433716489236182
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
outline: []
|
|
||||||
customData:
|
|
||||||
physicsShape: []
|
|
||||||
bones: []
|
|
||||||
spriteID:
|
|
||||||
internalID: 0
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
secondaryTextures: []
|
|
||||||
spriteCustomMetadata:
|
|
||||||
entries: []
|
|
||||||
nameFileIdTable:
|
|
||||||
pngtree-weapon-gun-flat-icon-handgun-png-image_4933503_0: 6013433716489236182
|
|
||||||
mipmapLimitGroupName:
|
|
||||||
pSDRemoveMatte: 0
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,178 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &5213001249979318174
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1149395136374715657}
|
|
||||||
- component: {fileID: 8026032327717419331}
|
|
||||||
- component: {fileID: 8712449370490801022}
|
|
||||||
- component: {fileID: 3940916619600254679}
|
|
||||||
- component: {fileID: 7665728843769076804}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Gun
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &1149395136374715657
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5213001249979318174}
|
|
||||||
serializedVersion: 2
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!212 &8026032327717419331
|
|
||||||
SpriteRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5213001249979318174}
|
|
||||||
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_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_SortingLayerID: 0
|
|
||||||
m_SortingLayer: 0
|
|
||||||
m_SortingOrder: 0
|
|
||||||
m_Sprite: {fileID: 6013433716489236182, guid: e702bce75f9e4df8ea233b25756258da, type: 3}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_FlipX: 0
|
|
||||||
m_FlipY: 0
|
|
||||||
m_DrawMode: 0
|
|
||||||
m_Size: {x: 2.86, y: 1.84}
|
|
||||||
m_AdaptiveModeThreshold: 0.5
|
|
||||||
m_SpriteTileMode: 0
|
|
||||||
m_WasSpriteAssigned: 1
|
|
||||||
m_MaskInteraction: 0
|
|
||||||
m_SpriteSortPoint: 0
|
|
||||||
--- !u!114 &8712449370490801022
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5213001249979318174}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 9960e65b78321cc8a85166a904f8f617, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
damageStrength: 0
|
|
||||||
--- !u!61 &3940916619600254679
|
|
||||||
BoxCollider2D:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5213001249979318174}
|
|
||||||
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: 1
|
|
||||||
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: 2.86, y: 1.84}
|
|
||||||
newSize: {x: 2.86, y: 1.84}
|
|
||||||
adaptiveTilingThreshold: 0.5
|
|
||||||
drawMode: 0
|
|
||||||
adaptiveTiling: 0
|
|
||||||
m_AutoTiling: 0
|
|
||||||
m_Size: {x: 2.86, y: 1.84}
|
|
||||||
m_EdgeRadius: 0
|
|
||||||
--- !u!50 &7665728843769076804
|
|
||||||
Rigidbody2D:
|
|
||||||
serializedVersion: 5
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5213001249979318174}
|
|
||||||
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
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 98b57b15498e96a9c8fe56264ac2ef63
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,183 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &398740452138961375
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 4344634732794346337}
|
|
||||||
- component: {fileID: 5639616099047780729}
|
|
||||||
- component: {fileID: 480941680556316754}
|
|
||||||
- component: {fileID: 8441426735084966298}
|
|
||||||
- component: {fileID: 3449798187735636588}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: GunThrower
|
|
||||||
m_TagString: Ratbot
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &4344634732794346337
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 398740452138961375}
|
|
||||||
serializedVersion: 2
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0.45, y: 0.45, z: 0.45}
|
|
||||||
m_ConstrainProportionsScale: 1
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!114 &5639616099047780729
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 398740452138961375}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 3ebac0379db13f0c3932982bc0ebed28, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
moveSpeed: 1500
|
|
||||||
damageStrength: 10
|
|
||||||
damageTimeoutSeconds: 0.5
|
|
||||||
health: 10
|
|
||||||
gun: {fileID: 5213001249979318174, guid: 98b57b15498e96a9c8fe56264ac2ef63, type: 3}
|
|
||||||
throwSpeed: 500
|
|
||||||
--- !u!212 &480941680556316754
|
|
||||||
SpriteRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 398740452138961375}
|
|
||||||
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_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_SortingLayerID: 0
|
|
||||||
m_SortingLayer: 0
|
|
||||||
m_SortingOrder: 1
|
|
||||||
m_Sprite: {fileID: -3751497128136096670, guid: 520c934c186517356929c5948597af6f, type: 3}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_FlipX: 0
|
|
||||||
m_FlipY: 0
|
|
||||||
m_DrawMode: 0
|
|
||||||
m_Size: {x: 5.12, y: 5.12}
|
|
||||||
m_AdaptiveModeThreshold: 0.5
|
|
||||||
m_SpriteTileMode: 0
|
|
||||||
m_WasSpriteAssigned: 1
|
|
||||||
m_MaskInteraction: 0
|
|
||||||
m_SpriteSortPoint: 0
|
|
||||||
--- !u!61 &8441426735084966298
|
|
||||||
BoxCollider2D:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 398740452138961375}
|
|
||||||
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: 3.53, y: 4.2}
|
|
||||||
newSize: {x: 5.12, y: 5.12}
|
|
||||||
adaptiveTilingThreshold: 0.5
|
|
||||||
drawMode: 0
|
|
||||||
adaptiveTiling: 0
|
|
||||||
m_AutoTiling: 0
|
|
||||||
m_Size: {x: 3.53, y: 4.2}
|
|
||||||
m_EdgeRadius: 0
|
|
||||||
--- !u!50 &3449798187735636588
|
|
||||||
Rigidbody2D:
|
|
||||||
serializedVersion: 5
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 398740452138961375}
|
|
||||||
m_BodyType: 0
|
|
||||||
m_Simulated: 1
|
|
||||||
m_UseFullKinematicContacts: 0
|
|
||||||
m_UseAutoMass: 0
|
|
||||||
m_Mass: 0.5
|
|
||||||
m_LinearDamping: 10
|
|
||||||
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: 4
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b1e1e6378fb12d47e989565896a737ef
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -165,7 +165,7 @@ Rigidbody2D:
|
|||||||
m_UseFullKinematicContacts: 0
|
m_UseFullKinematicContacts: 0
|
||||||
m_UseAutoMass: 0
|
m_UseAutoMass: 0
|
||||||
m_Mass: 0.5
|
m_Mass: 0.5
|
||||||
m_LinearDamping: 15
|
m_LinearDamping: 10
|
||||||
m_AngularDamping: 0.05
|
m_AngularDamping: 0.05
|
||||||
m_GravityScale: 1
|
m_GravityScale: 1
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
|
|||||||
@@ -160,8 +160,7 @@ TextureImporter:
|
|||||||
secondaryTextures: []
|
secondaryTextures: []
|
||||||
spriteCustomMetadata:
|
spriteCustomMetadata:
|
||||||
entries: []
|
entries: []
|
||||||
nameFileIdTable:
|
nameFileIdTable: {}
|
||||||
TeoSword_2_0: -4241835214737505916
|
|
||||||
mipmapLimitGroupName:
|
mipmapLimitGroupName:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@@ -160,8 +160,7 @@ TextureImporter:
|
|||||||
secondaryTextures: []
|
secondaryTextures: []
|
||||||
spriteCustomMetadata:
|
spriteCustomMetadata:
|
||||||
entries: []
|
entries: []
|
||||||
nameFileIdTable:
|
nameFileIdTable: {}
|
||||||
TeoSword_clear_0: 5912729268939179329
|
|
||||||
mipmapLimitGroupName:
|
mipmapLimitGroupName:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@@ -160,8 +160,7 @@ TextureImporter:
|
|||||||
secondaryTextures: []
|
secondaryTextures: []
|
||||||
spriteCustomMetadata:
|
spriteCustomMetadata:
|
||||||
entries: []
|
entries: []
|
||||||
nameFileIdTable:
|
nameFileIdTable: {}
|
||||||
GYNxJn_0: 7760431067827908858
|
|
||||||
mipmapLimitGroupName:
|
mipmapLimitGroupName:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@@ -160,8 +160,7 @@ TextureImporter:
|
|||||||
secondaryTextures: []
|
secondaryTextures: []
|
||||||
spriteCustomMetadata:
|
spriteCustomMetadata:
|
||||||
entries: []
|
entries: []
|
||||||
nameFileIdTable:
|
nameFileIdTable: {}
|
||||||
roborat_0: -4827719251672435245
|
|
||||||
mipmapLimitGroupName:
|
mipmapLimitGroupName:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@@ -681,10 +681,8 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
state: 0
|
state: 0
|
||||||
wave: 0
|
wave: 0
|
||||||
shop: {fileID: 6569104281457075541, guid: c0d23b24c9c882ef89013998dab29dea, type: 3}
|
|
||||||
ratbot: {fileID: 398740452138961375, guid: 5887eeeb7c78eb5c7bf46c5893fd4846, type: 3}
|
ratbot: {fileID: 398740452138961375, guid: 5887eeeb7c78eb5c7bf46c5893fd4846, type: 3}
|
||||||
gunThrower: {fileID: 398740452138961375, guid: b1e1e6378fb12d47e989565896a737ef, type: 3}
|
shop: {fileID: 6569104281457075541, guid: c0d23b24c9c882ef89013998dab29dea, type: 3}
|
||||||
fastFucker: {fileID: 7192111562784377269, guid: 2c67a9ffe3cbdc6989fcabe398ffd2dc, type: 3}
|
|
||||||
--- !u!4 &745837569
|
--- !u!4 &745837569
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -4,18 +4,8 @@ public class GameState : MonoBehaviour
|
|||||||
{
|
{
|
||||||
public State state;
|
public State state;
|
||||||
public uint wave;
|
public uint wave;
|
||||||
public GameObject shop;
|
|
||||||
public GameObject ratbot;
|
public GameObject ratbot;
|
||||||
public GameObject gunThrower;
|
public GameObject shop;
|
||||||
public GameObject fastFucker;
|
|
||||||
|
|
||||||
int[] counts = new int[3];
|
|
||||||
enum CountIndex : uint {
|
|
||||||
ratbot = 0,
|
|
||||||
gunThrower = 1,
|
|
||||||
fastFucker = 2
|
|
||||||
}
|
|
||||||
|
|
||||||
void Start() {
|
void Start() {
|
||||||
OpenShop();
|
OpenShop();
|
||||||
}
|
}
|
||||||
@@ -30,9 +20,7 @@ public class GameState : MonoBehaviour
|
|||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
if (GameObject.FindGameObjectsWithTag("Ratbot").Length == 0
|
if (GameObject.FindGameObjectsWithTag("Ratbot").Length == 0 && state == State.Wave) {
|
||||||
&& state == State.Wave
|
|
||||||
) {
|
|
||||||
OpenShop();
|
OpenShop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,44 +34,16 @@ public class GameState : MonoBehaviour
|
|||||||
// Spawn ratbots around the player
|
// Spawn ratbots around the player
|
||||||
// Amount, health, and damage scale with waves
|
// Amount, health, and damage scale with waves
|
||||||
state = State.Wave;
|
state = State.Wave;
|
||||||
Vector3 playerPosition
|
Vector3 playerPosition = GameObject.FindGameObjectWithTag("Player").transform.position;
|
||||||
= GameObject
|
|
||||||
.FindGameObjectWithTag("Player")
|
|
||||||
.transform
|
|
||||||
.position;
|
|
||||||
for (uint _ = 0; _ <= wave; _++) {
|
for (uint _ = 0; _ <= wave; _++) {
|
||||||
GameObject newRatbot = Instantiate(
|
GameObject newRatbot = Instantiate(
|
||||||
SpawnRatbot(),
|
ratbot,
|
||||||
// Spawn ratbots in a circle around the player
|
Random.insideUnitCircle.normalized*20,
|
||||||
Random.insideUnitCircle.normalized*20
|
|
||||||
+ new Vector2 (
|
|
||||||
playerPosition.x,
|
|
||||||
playerPosition.y
|
|
||||||
),
|
|
||||||
Quaternion.identity
|
Quaternion.identity
|
||||||
);
|
);
|
||||||
// Set ratbot damageStrength and health
|
newRatbot.GetComponent<Ratbot>().damageStrength = 5+wave*5;
|
||||||
// TODO: set speed
|
|
||||||
newRatbot.GetComponent<Ratbot>().damageStrength
|
|
||||||
= 5+wave*5;
|
|
||||||
newRatbot.GetComponent<Ratbot>().health = 5+wave*2;
|
newRatbot.GetComponent<Ratbot>().health = 5+wave*2;
|
||||||
}
|
}
|
||||||
wave++;
|
wave++;
|
||||||
}
|
}
|
||||||
public GameObject SpawnRatbot() {
|
|
||||||
// TODO: Convert this mess into a switch case
|
|
||||||
if (counts[(uint)CountIndex.gunThrower] < wave/3
|
|
||||||
&& wave > 3
|
|
||||||
) {
|
|
||||||
counts[(uint)CountIndex.gunThrower]++;
|
|
||||||
return gunThrower;
|
|
||||||
}
|
|
||||||
if (counts[(uint)CountIndex.fastFucker] < wave/4
|
|
||||||
&& wave > 2
|
|
||||||
) {
|
|
||||||
counts[(uint)CountIndex.fastFucker]++;
|
|
||||||
return fastFucker;
|
|
||||||
}
|
|
||||||
return ratbot;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,36 +7,23 @@ public class Ratbot : MonoBehaviour
|
|||||||
public float damageTimeoutSeconds;
|
public float damageTimeoutSeconds;
|
||||||
public float health = 10;
|
public float health = 10;
|
||||||
float lastDamageTime;
|
float lastDamageTime;
|
||||||
|
GameState gameState;
|
||||||
public static GameState gameState;
|
GameObject player;
|
||||||
public static GameObject player;
|
|
||||||
public Rigidbody2D controller;
|
|
||||||
|
|
||||||
void Start() {
|
void Start() {
|
||||||
SetVars();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetVars() {
|
|
||||||
controller = GetComponent<Rigidbody2D>();
|
|
||||||
// Set gameState and player objects
|
// Set gameState and player objects
|
||||||
player = GameObject.FindGameObjectWithTag("Player");
|
player = GameObject.FindGameObjectWithTag("Player");
|
||||||
gameState = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameState>();
|
gameState = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameState>();
|
||||||
}
|
|
||||||
|
|
||||||
void Update() {
|
|
||||||
MoveTowardsPlayer(moveSpeed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveTowardsPlayer(float speed) {
|
void Update() {
|
||||||
controller.AddRelativeForce(
|
// Constantly move towards player
|
||||||
(player.transform.position - transform.position)
|
Rigidbody2D controller = GetComponent<Rigidbody2D>();
|
||||||
.normalized
|
Vector2 direction = (player.transform.position - transform.position).normalized;
|
||||||
*speed
|
controller.AddRelativeForce(direction*moveSpeed*Time.deltaTime);
|
||||||
*Time.deltaTime
|
}
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual void OnCollisionStay2D(Collision2D collision) {
|
void OnCollisionStay2D(Collision2D collision) {
|
||||||
// Deal damage when colliding with the player on a 0.5 second cooldown
|
// Deal damage when colliding with the player on a 0.5 second cooldown
|
||||||
if (collision.gameObject.tag != "Player") return;
|
if (collision.gameObject.tag != "Player") return;
|
||||||
if (lastDamageTime > Time.fixedTime-damageTimeoutSeconds) return;
|
if (lastDamageTime > Time.fixedTime-damageTimeoutSeconds) return;
|
||||||
@@ -46,6 +33,7 @@ public class Ratbot : MonoBehaviour
|
|||||||
|
|
||||||
// Die if health below zero
|
// Die if health below zero
|
||||||
public void Damage(float hurtyAmount) {
|
public void Damage(float hurtyAmount) {
|
||||||
|
Debug.Log(hurtyAmount);
|
||||||
health -= hurtyAmount;
|
health -= hurtyAmount;
|
||||||
if (health <= 0) {
|
if (health <= 0) {
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 80a6f9e1f8fdfdbcfb3c74283bd49306
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
public class FastFucker : Ratbot
|
|
||||||
{
|
|
||||||
bool attack = true;
|
|
||||||
void Update() {
|
|
||||||
if (attack)
|
|
||||||
MoveTowardsPlayer(moveSpeed*2);
|
|
||||||
else
|
|
||||||
MoveAwayFromPlayer(moveSpeed);
|
|
||||||
}
|
|
||||||
void MoveAwayFromPlayer(float speed) {
|
|
||||||
controller.AddRelativeForce(
|
|
||||||
(transform.position - player.transform.position)
|
|
||||||
.normalized
|
|
||||||
*speed
|
|
||||||
*Time.deltaTime
|
|
||||||
);
|
|
||||||
}
|
|
||||||
new void OnCollisionStay2D (Collision2D collision) {
|
|
||||||
base.OnCollisionStay2D(collision);
|
|
||||||
StartCoroutine("RunAway");
|
|
||||||
}
|
|
||||||
IEnumerator RunAway() {
|
|
||||||
attack = false;
|
|
||||||
yield return new WaitForSeconds (1F);
|
|
||||||
attack = true;
|
|
||||||
}
|
|
||||||
new void Damage (float hurtyAmount) {
|
|
||||||
RunAway();
|
|
||||||
base.Damage(hurtyAmount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 07603fdf7ab38f05493e2a22ef5cae06
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class Gun : MonoBehaviour
|
|
||||||
{
|
|
||||||
public float damageStrength;
|
|
||||||
|
|
||||||
void OnTriggerEnter2D (Collider2D hit) {
|
|
||||||
// Damage player and destroy self on impact
|
|
||||||
if (hit.tag != "Player") return;
|
|
||||||
hit.GetComponent<Teo>().health -= damageStrength;
|
|
||||||
Destroy(gameObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Update() {
|
|
||||||
transform.Rotate(new Vector3 (0, 0, Time.deltaTime * 1000));
|
|
||||||
if (Vector3.Distance(
|
|
||||||
transform.position,
|
|
||||||
GameObject.FindGameObjectWithTag("Player").transform.position
|
|
||||||
) > 20) Destroy(gameObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 9960e65b78321cc8a85166a904f8f617
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class GunThrower : Ratbot
|
|
||||||
{
|
|
||||||
public GameObject gun;
|
|
||||||
public float throwSpeed;
|
|
||||||
|
|
||||||
void Start() {
|
|
||||||
SetVars();
|
|
||||||
InvokeRepeating(
|
|
||||||
"ThrowGun",
|
|
||||||
Random.Range(1, 3),
|
|
||||||
Random.Range(1, 3)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ThrowGun() {
|
|
||||||
GameObject thrown = Instantiate(
|
|
||||||
gun,
|
|
||||||
transform.position,
|
|
||||||
Quaternion.identity
|
|
||||||
);
|
|
||||||
thrown.GetComponent<Rigidbody2D>().AddRelativeForce((
|
|
||||||
player.transform.position - thrown.transform.position
|
|
||||||
).normalized * throwSpeed);
|
|
||||||
thrown.GetComponent<Gun>().damageStrength = damageStrength;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 3ebac0379db13f0c3932982bc0ebed28
|
|
||||||
@@ -94,9 +94,21 @@ public class Teo : MonoBehaviour
|
|||||||
).normalized * dashDistance);
|
).normalized * dashDistance);
|
||||||
// Wait 0.2 seconds before ending the dash
|
// Wait 0.2 seconds before ending the dash
|
||||||
yield return new WaitForSeconds(0.2F);
|
yield return new WaitForSeconds(0.2F);
|
||||||
// Re enable collision and linearDamping after dash complete
|
// Re enable collision and linearDamping after dash
|
||||||
dashing = false;
|
dashing = false;
|
||||||
collider.enabled = true;
|
|
||||||
controller.linearDamping = 15;
|
controller.linearDamping = 15;
|
||||||
|
// Push enemies away at end of dash
|
||||||
|
foreach (Collider2D hit in Physics2D.OverlapCircleAll(
|
||||||
|
transform.position, 3
|
||||||
|
)) {
|
||||||
|
if (hit.tag != "Ratbot") continue;
|
||||||
|
hit.GetComponent<Rigidbody2D>().AddRelativeForce(
|
||||||
|
(hit.transform.position - transform.position)
|
||||||
|
.normalized * dashDistance
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// Don't take damage at end of dash
|
||||||
|
yield return new WaitForSeconds(0.2F);
|
||||||
|
collider.enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user