fixed chest, improved ui, improved difficulty
This commit is contained in:
Binary file not shown.
34
Assets/AddressableAssetsData/ProfileDataSourceSettings.asset
Normal file
34
Assets/AddressableAssetsData/ProfileDataSourceSettings.asset
Normal file
@@ -0,0 +1,34 @@
|
||||
%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: 7e3976da977cb49238499ea3b4c237ae, type: 3}
|
||||
m_Name: ProfileDataSourceSettings
|
||||
m_EditorClassIdentifier:
|
||||
profileGroupTypes:
|
||||
- m_GroupTypePrefix: Built-In
|
||||
m_Variables:
|
||||
- m_Suffix: BuildPath
|
||||
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
|
||||
- m_Suffix: LoadPath
|
||||
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
|
||||
- m_GroupTypePrefix: Editor Hosted
|
||||
m_Variables:
|
||||
- m_Suffix: BuildPath
|
||||
m_Value: ServerData/[BuildTarget]
|
||||
- m_Suffix: LoadPath
|
||||
m_Value: http://[PrivateIpAddress]:[HostingServicePort]
|
||||
environments: []
|
||||
currentEnvironment:
|
||||
id:
|
||||
projectId:
|
||||
projectGenesisId:
|
||||
name:
|
||||
isDefault: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 218a10ee35c2bbf68a612c7b5b10fc92
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
BIN
Assets/IMG/Aseprite/NEW_DropdownArrow.aseprite
Normal file
BIN
Assets/IMG/Aseprite/NEW_DropdownArrow.aseprite
Normal file
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5542575429a29e543ae3c2420b8e2144
|
||||
guid: da9db8e2bf84a0025920000f3fff6406
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 501 B |
BIN
Assets/IMG/NEW_DropdownArrow.png
Normal file
BIN
Assets/IMG/NEW_DropdownArrow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 930 B |
@@ -1,12 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb116eb6b0a00b3498e75469e4a3ac7f
|
||||
guid: 7e40070128bdf4264bf6da295f3a345c
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
@@ -20,10 +20,12 @@ TextureImporter:
|
||||
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
|
||||
@@ -32,16 +34,16 @@ TextureImporter:
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: -1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 1
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
@@ -50,9 +52,9 @@ TextureImporter:
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
@@ -62,6 +64,8 @@ TextureImporter:
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
@@ -73,6 +77,33 @@ TextureImporter:
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 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
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
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:
|
||||
@@ -81,16 +112,16 @@ TextureImporter:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -984,7 +984,7 @@ MonoBehaviour:
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
- m_Id: 236781229043712
|
||||
m_Key: Plain
|
||||
m_Key: plain
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
- m_Id: 13166294331397
|
||||
|
||||
@@ -227,6 +227,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 7290224385214606018}
|
||||
- component: {fileID: 6286653566616308184}
|
||||
- component: {fileID: 5335501847136282350}
|
||||
- component: {fileID: 2081075255274643338}
|
||||
m_Layer: 0
|
||||
m_Name: House
|
||||
m_TagString: Untagged
|
||||
@@ -244,7 +246,7 @@ Transform:
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||
m_LocalScale: {x: 0.05, y: 0.05, z: 0.05}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 453517342273645446}
|
||||
@@ -294,6 +296,54 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!54 &5335501847136282350
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7955543730560905336}
|
||||
serializedVersion: 4
|
||||
m_Mass: 1
|
||||
m_Drag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
||||
m_InertiaTensor: {x: 1, y: 1, z: 1}
|
||||
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ImplicitCom: 1
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 122
|
||||
m_CollisionDetection: 0
|
||||
--- !u!65 &2081075255274643338
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7955543730560905336}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 9.162189, y: 1, z: 9.001316}
|
||||
m_Center: {x: -5.084507, y: 0, z: -4.8499103}
|
||||
--- !u!1 &8263785157974351812
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -456,8 +506,8 @@ BoxCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 0.02, y: 0.04170223, z: 0.020000005}
|
||||
m_Center: {x: 0, y: -0.010851122, z: 1.2354351e-17}
|
||||
m_Size: {x: 0.02, y: 0.0668083, z: 0.020000005}
|
||||
m_Center: {x: 0, y: 0.0017019166, z: -1.0034578e-18}
|
||||
--- !u!1001 &8303087274738875168
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -12,7 +12,6 @@ GameObject:
|
||||
- component: {fileID: 4746436315780206846}
|
||||
- component: {fileID: 3643037885371697210}
|
||||
- component: {fileID: 3617830697705415883}
|
||||
- component: {fileID: 2049341713637145185}
|
||||
m_Layer: 0
|
||||
m_Name: Body
|
||||
m_TagString: Object:Chest
|
||||
@@ -27,13 +26,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1869985577942801268}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: -0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 200, y: 100, z: 100}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1632792077707532535}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &4746436315780206846
|
||||
MeshFilter:
|
||||
@@ -93,25 +92,20 @@ MeshCollider:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1869985577942801268}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 0
|
||||
serializedVersion: 5
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 2959467708922500008, guid: 51c20e6e0974ae178b06511eaff4b1df, type: 3}
|
||||
--- !u!114 &2049341713637145185
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1869985577942801268}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 542700d30d7f9c98a910fb33e30c4174, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
gotItem: 0
|
||||
--- !u!1 &2153572824955224653
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -121,6 +115,8 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1632792077707532535}
|
||||
- component: {fileID: 509854807188144422}
|
||||
- component: {fileID: 5628219081204623371}
|
||||
m_Layer: 0
|
||||
m_Name: chest
|
||||
m_TagString: Object:Chest
|
||||
@@ -135,6 +131,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2153572824955224653}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.6, y: 0.6, z: 0.6}
|
||||
@@ -143,8 +140,40 @@ Transform:
|
||||
- {fileID: 2951908357397984550}
|
||||
- {fileID: 7198831178314920339}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &509854807188144422
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2153572824955224653}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 4, y: 2.3, z: 2}
|
||||
m_Center: {x: 0, y: 0.1, z: 0}
|
||||
--- !u!114 &5628219081204623371
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2153572824955224653}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 542700d30d7f9c98a910fb33e30c4174, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &2792788107212511064
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -172,13 +201,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2792788107212511064}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: -0, y: 1.1, z: 0}
|
||||
m_LocalScale: {x: 200, y: 100, z: 10}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1632792077707532535}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &2300175584090436990
|
||||
MeshFilter:
|
||||
@@ -239,10 +268,18 @@ MeshCollider:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2792788107212511064}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 0
|
||||
serializedVersion: 5
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 4293751317952506913, guid: 51c20e6e0974ae178b06511eaff4b1df, type: 3}
|
||||
--- !u!95 &8005207008852830764
|
||||
|
||||
@@ -1,5 +1,77 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6333500881262748346
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3684410572080435307}
|
||||
- component: {fileID: 359633249958826334}
|
||||
- component: {fileID: 3429361490740746378}
|
||||
m_Layer: 5
|
||||
m_Name: slotItem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3684410572080435307
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6333500881262748346}
|
||||
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: 3948338302074099163}
|
||||
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 &359633249958826334
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6333500881262748346}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3429361490740746378
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6333500881262748346}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Texture: {fileID: 0}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!1 &7287345907462116809
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -11,7 +83,6 @@ GameObject:
|
||||
- component: {fileID: 3948338302074099163}
|
||||
- component: {fileID: 6281336247825305208}
|
||||
- component: {fileID: 6848317083609613261}
|
||||
- component: {fileID: 6141205227167828802}
|
||||
- component: {fileID: 3847962230600515313}
|
||||
- component: {fileID: 1023590545195096446}
|
||||
m_Layer: 5
|
||||
@@ -32,9 +103,9 @@ RectTransform:
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 3684410572080435307}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -89,7 +160,7 @@ MonoBehaviour:
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 6141205227167828802}
|
||||
m_TargetGraphic: {fileID: 0}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
@@ -105,33 +176,6 @@ MonoBehaviour:
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &6141205227167828802
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7287345907462116809}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, 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_Texture: {fileID: 0}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!114 &3847962230600515313
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -28,12 +28,12 @@ RectTransform:
|
||||
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:
|
||||
- {fileID: 6865277369926582133}
|
||||
- {fileID: 6865277369871256364}
|
||||
- {fileID: 6865277368991576806}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -61,7 +61,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
|
||||
m_Color: {r: 0.27058825, g: 0.4117647, b: 0.5647059, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
@@ -106,9 +106,9 @@ RectTransform:
|
||||
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: 6865277368214506387}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.75, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -178,9 +178,9 @@ RectTransform:
|
||||
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: 6865277368214506387}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.75, y: 1}
|
||||
@@ -208,7 +208,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_Color: {r: 0.1764706, g: 0.84705883, b: 0.5058824, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
@@ -216,7 +216,7 @@ MonoBehaviour:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Font: {fileID: 12800000, guid: 2b8c3fce9287a0e499b95c5a3fb17529, type: 3}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
@@ -257,9 +257,9 @@ RectTransform:
|
||||
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: 6865277368214506387}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
@@ -287,7 +287,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_Color: {r: 0.1764706, g: 0.84705883, b: 0.5058824, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
@@ -295,7 +295,7 @@ MonoBehaviour:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Font: {fileID: 12800000, guid: 2b8c3fce9287a0e499b95c5a3fb17529, type: 3}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
|
||||
@@ -10,7 +10,6 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 206628748623723553}
|
||||
- component: {fileID: 206628748623723559}
|
||||
- component: {fileID: 206628748623723558}
|
||||
- component: {fileID: 206628748623723556}
|
||||
- component: {fileID: 206628748623723557}
|
||||
m_Layer: 5
|
||||
@@ -31,9 +30,9 @@ RectTransform:
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 5865062627113700334}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.075, y: 0.675}
|
||||
m_AnchorMax: {x: 0.175, y: 0.975}
|
||||
@@ -48,33 +47,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 206628748623723552}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &206628748623723558
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 206628748623723552}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, 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_Texture: {fileID: 0}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!114 &206628748623723556
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -165,3 +137,75 @@ MonoBehaviour:
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!1 &2806964795216379488
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5865062627113700334}
|
||||
- component: {fileID: 1064219139618105133}
|
||||
- component: {fileID: 3644084172752935416}
|
||||
m_Layer: 5
|
||||
m_Name: item
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5865062627113700334
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2806964795216379488}
|
||||
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: 206628748623723553}
|
||||
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 &1064219139618105133
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2806964795216379488}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3644084172752935416
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2806964795216379488}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, 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_Texture: {fileID: 0}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
|
||||
@@ -143,7 +143,7 @@ Rigidbody:
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_Constraints: 122
|
||||
m_CollisionDetection: 0
|
||||
--- !u!64 &6135128249415564205
|
||||
MeshCollider:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -28,7 +28,7 @@ namespace Assets.Scripts
|
||||
}
|
||||
else
|
||||
{
|
||||
gameObject.transform.parent.Find("Lid").GetComponent<Animator>().Play("ChestOpen");
|
||||
gameObject.transform.Find("Lid").GetComponent<Animator>().Play("ChestOpen");
|
||||
Item item;
|
||||
int luck = GameObject.Find("Player").GetComponent<PlayerGameObject>().getPlayerStat("Luck").getAmount();
|
||||
int type = new System.Random().Next(3);
|
||||
@@ -57,7 +57,7 @@ namespace Assets.Scripts
|
||||
public void loadChest(bool gotItem){
|
||||
this.gotItem = gotItem;
|
||||
if(gotItem){
|
||||
gameObject.transform.parent.Find("Lid").GetComponent<Animator>().Play("ChestOpen");
|
||||
gameObject.transform.Find("Lid").GetComponent<Animator>().Play("ChestOpen");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,15 +260,15 @@ public class ContentGenerator : MonoBehaviour
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else if (chance >= 10 && chance < 40)
|
||||
else if (chance >= 10 && chance < 25)
|
||||
{
|
||||
return house;
|
||||
}
|
||||
else if (chance >= 40 && chance < 65)
|
||||
else if (chance >= 25 && chance < 55)
|
||||
{
|
||||
return trees[rand.Next(0, trees.Length)];
|
||||
}
|
||||
else if (chance >= 65 && chance < 90)
|
||||
else if (chance >= 55 && chance < 85)
|
||||
{
|
||||
return stones[rand.Next(0, stones.Length)];
|
||||
}
|
||||
|
||||
@@ -69,21 +69,15 @@ public class Controls : MonoBehaviour
|
||||
if (uihandler.canPlayerRotate()){
|
||||
playerCam.GetComponent<PlayerCamera>().lookAround(view, playerInput.currentControlScheme == "Controller");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void FixedUpdate(){
|
||||
if (!player.GetComponent<PlayerGameObject>().takeDamage(0))
|
||||
{
|
||||
if (!uihandler.isPlayerInFight())
|
||||
{
|
||||
if (uihandler.canPlayerMove())
|
||||
{
|
||||
player.GetComponent<PlayerGameObject>().move(input);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void FixedUpdate(){
|
||||
if(direction != MoveDirection.None){
|
||||
AxisEventData data = new AxisEventData(EventSystem.current);
|
||||
data.moveDir = direction;
|
||||
|
||||
@@ -20,7 +20,7 @@ public class Fight : MonoBehaviour
|
||||
this.enemy = enemy;
|
||||
this.player = player;
|
||||
enemy.GetComponent<Enemy>().scaleEnemy(player.GetComponent<PlayerGameObject>());
|
||||
enemy.transform.rotation = Quaternion.Euler(0,GameObject.Find("Main Camera").transform.rotation.y + 180f,0);
|
||||
enemy.transform.rotation = Quaternion.Euler(0, GameObject.Find("Main Camera").transform.rotation.y + 180f, 0);
|
||||
|
||||
uihandler = GameObject.Find("UIHandler").GetComponent<UIHandler>();
|
||||
uihandler.openFight();
|
||||
@@ -37,11 +37,20 @@ public class Fight : MonoBehaviour
|
||||
{
|
||||
int playerDamage = 0;
|
||||
int skillnumber = -1;
|
||||
bool escapedSuccesfully = false;
|
||||
switch (index)
|
||||
{
|
||||
case 1:
|
||||
endFight();
|
||||
uihandler.showMessage("INFORMATION;"+TextHandler.getText("escape"));
|
||||
if (rand.Next(1, 11) <= 3)
|
||||
{
|
||||
escapedSuccesfully = true;
|
||||
endFight();
|
||||
uihandler.showMessage("INFORMATION;" + TextHandler.getText("escape"));
|
||||
}
|
||||
else
|
||||
{
|
||||
uihandler.showMessage("ERROR;" + TextHandler.getText("escapeFail"));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
//User waits
|
||||
@@ -81,7 +90,8 @@ public class Fight : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
if (index != 1)
|
||||
int chance = escapedSuccesfully ? 3 : 10;
|
||||
if (rand.Next(1, 11) <= chance)
|
||||
{
|
||||
enemyAction();
|
||||
uihandler.updateFightInterface(enemy, player);
|
||||
@@ -94,7 +104,7 @@ public class Fight : MonoBehaviour
|
||||
int enemyDamage = -1;
|
||||
// { health, maxHealth, secondary, maxSecondary, strength, dexterity, intelligence };
|
||||
int[] enemyStats = enemy.GetComponent<Enemy>().getStats();
|
||||
int index = rand.Next(0,2);
|
||||
int index = rand.Next(0, 2);
|
||||
|
||||
if (index == 1 && enemyStats[2] <= 0)
|
||||
{
|
||||
|
||||
@@ -11,61 +11,29 @@ namespace Assets.Scripts
|
||||
{
|
||||
class EasterEggHandler
|
||||
{
|
||||
public static void applyEasterEgg(PlayerObject player)
|
||||
public static void applyEasterEgg(string playername)
|
||||
{
|
||||
if (player.getPlayerName().ToLower().Length > 0)
|
||||
if (playername.ToLower().Length > 0)
|
||||
{
|
||||
applyNameEasterEgg(player);
|
||||
applyNameEasterEgg(playername.ToLower());
|
||||
}
|
||||
}
|
||||
|
||||
private static void applyNameEasterEgg(PlayerObject player)
|
||||
private static void applyNameEasterEgg(string playername)
|
||||
{
|
||||
//maxHealth, maxSecondary, strength, dexterity, intelligence
|
||||
/*int[] result = new int[5];
|
||||
int[] stats = player.getStats();
|
||||
switch (player.getPlayerName().ToLower())
|
||||
//TODO: Create achievements fitting of their contribution... no game changing things, except godmode
|
||||
switch (playername)
|
||||
{
|
||||
case "threetimes8":
|
||||
result[0] = 240;
|
||||
result[1] = 240;
|
||||
result[2] = 24;
|
||||
result[3] = 24;
|
||||
result[4] = 24;
|
||||
break;
|
||||
case "finnchen123":
|
||||
result[0] = 1230;
|
||||
result[1] = 1230;
|
||||
result[2] = 123;
|
||||
result[3] = 123;
|
||||
result[4] = 123;
|
||||
break;
|
||||
case "thefluffeypanda":
|
||||
result[0] = 470;
|
||||
result[1] = 470;
|
||||
result[2] = 47;
|
||||
result[3] = 47;
|
||||
result[4] = 47;
|
||||
break;
|
||||
case "nicola":
|
||||
result[0] = stats[1];
|
||||
result[1] = stats[3];
|
||||
result[2] = stats[4];
|
||||
result[3] = stats[5];
|
||||
result[4] = stats[6];
|
||||
SteamWorksHandler.getGodModeAchievement();
|
||||
break;
|
||||
default:
|
||||
result[0] = stats[1];
|
||||
result[1] = stats[3];
|
||||
result[2] = stats[4];
|
||||
result[3] = stats[5];
|
||||
result[4] = stats[6];
|
||||
break;
|
||||
}
|
||||
player.setStats(result);*/
|
||||
|
||||
//TODO FIX whole Easteregg mechanic to go with the new player
|
||||
}
|
||||
|
||||
public static bool isGodMode(PlayerObject player)
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Assets.Scripts
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (state == UIState.GAME)
|
||||
if (state == UIState.GAME || state == UIState.FIGHT)
|
||||
{
|
||||
if (GameObject.Find("Player").GetComponent<PlayerGameObject>().getPlayerStat("Killcount").getAmount() == -1)
|
||||
{
|
||||
@@ -161,6 +161,7 @@ namespace Assets.Scripts
|
||||
{
|
||||
GameObject.Find("txtRounds").GetComponent<Text>().text = "-1";
|
||||
hideOtherElements(fight);
|
||||
playerHUD.transform.localScale = new Vector3(1, 1, 1);
|
||||
state = UIState.FIGHT;
|
||||
}
|
||||
|
||||
@@ -352,7 +353,6 @@ namespace Assets.Scripts
|
||||
|
||||
public void updateFightInterface(GameObject enemy, GameObject player)
|
||||
{
|
||||
updateFightInterfacePlayer(player.GetComponent<PlayerGameObject>());
|
||||
updateFightInterfaceEnemy(enemy);
|
||||
updateFightInterfaceActions(player.GetComponent<PlayerGameObject>());
|
||||
GameObject.Find("txtRounds").GetComponent<Text>().text = (int.Parse(GameObject.Find("txtRounds").GetComponent<Text>().text) + 1).ToString();
|
||||
@@ -369,21 +369,6 @@ namespace Assets.Scripts
|
||||
player.displayAction(2, actionSix.transform.Find("imgAction").gameObject, actionSix.transform.Find("descAction").gameObject);
|
||||
}
|
||||
|
||||
private void updateFightInterfacePlayer(PlayerGameObject player)
|
||||
{
|
||||
Dictionary<string, int> equipment = inventory.GetComponent<Inventory>().getEquipmentBonus();
|
||||
|
||||
GameObject foreground = GameObject.Find("healthForegroundPlayer");
|
||||
GameObject background = GameObject.Find("healthBackgroundPlayer");
|
||||
GameObject text = GameObject.Find("healthTextPlayer");
|
||||
updateBar(foreground, background, text, player.getPlayerStat("MaxHealth").getAmount() + equipment["HP"], player.getPlayerStat("Health").getAmount());
|
||||
|
||||
foreground = GameObject.Find("secondaryForegroundPlayer");
|
||||
background = GameObject.Find("secondaryBackgroundPlayer");
|
||||
text = GameObject.Find("secondaryTextPlayer");
|
||||
updateBar(foreground, background, text, player.getPlayerStat("MaxSecondary").getAmount() + equipment["MP"], player.getPlayerStat("Secondary").getAmount());
|
||||
}
|
||||
|
||||
private void updateFightInterfaceEnemy(GameObject enemy)
|
||||
{
|
||||
// { health, maxHealth, secondary, maxSecondary, strength, dexterity, intelligence };
|
||||
@@ -407,8 +392,8 @@ namespace Assets.Scripts
|
||||
GameObject.Find("txtStrength").GetComponent<Text>().text = "STR: " + player.getPlayerStat("Strength").getAmount() + " (+" + equipment["STR"] + ")";
|
||||
GameObject.Find("txtDexterity").GetComponent<Text>().text = "DEX: " + player.getPlayerStat("Dexterity").getAmount() + " (+" + equipment["DEX"] + ")";
|
||||
GameObject.Find("txtIntelligence").GetComponent<Text>().text = "INT: " + player.getPlayerStat("Intelligence").getAmount() + " (+" + equipment["INT"] + ")";
|
||||
GameObject.Find("txtHealth").GetComponent<Text>().text = TextHandler.getText("health") + " " + player.getPlayerStat("Health").getAmount() + " (+" + equipment["HP"] + ")";
|
||||
GameObject.Find("txtSecondary").GetComponent<Text>().text = "Mana: " + player.getPlayerStat("Secondary").getAmount() + " (+" + equipment["MP"] + ")";
|
||||
GameObject.Find("txtHealth").GetComponent<Text>().text = TextHandler.getText("health") + " " + player.getPlayerStat("MaxHealth").getAmount() + " (+" + equipment["HP"] + ")";
|
||||
GameObject.Find("txtSecondary").GetComponent<Text>().text = "Mana: " + player.getPlayerStat("MaxSecondary").getAmount() + " (+" + equipment["MP"] + ")";
|
||||
|
||||
player.updateName(GameObject.Find("txtName").GetComponent<Text>());
|
||||
updatePoints(player.getPlayerStat("Points").getAmount());
|
||||
@@ -447,14 +432,18 @@ namespace Assets.Scripts
|
||||
{
|
||||
Dictionary<string, int> equipment = inventory.GetComponent<Inventory>().getEquipmentBonus();
|
||||
|
||||
GameObject information = GameObject.Find("txtInformationHUD");
|
||||
GameObject information = GameObject.Find("txtPlayerInformationHUD");
|
||||
player.updateNameHUD(information.GetComponent<Text>());
|
||||
|
||||
GameObject fill = GameObject.Find("HUD_healthFill");
|
||||
updateFill(fill, null, player.getPlayerStat("MaxHealth").getAmount() + equipment["HP"], player.getPlayerStat("Health").getAmount());
|
||||
GameObject foreground = GameObject.Find("healthForegroundPlayer");
|
||||
GameObject background = GameObject.Find("healthBackgroundPlayer");
|
||||
GameObject text = GameObject.Find("healthTextPlayer");
|
||||
updateBar(foreground, background, text, player.getPlayerStat("MaxHealth").getAmount() + equipment["HP"], player.getPlayerStat("Health").getAmount());
|
||||
|
||||
fill = GameObject.Find("HUD_secondaryFill");
|
||||
updateFill(fill, null, player.getPlayerStat("MaxSecondary").getAmount() + equipment["MP"], player.getPlayerStat("Secondary").getAmount());
|
||||
foreground = GameObject.Find("secondaryForegroundPlayer");
|
||||
background = GameObject.Find("secondaryBackgroundPlayer");
|
||||
text = GameObject.Find("secondaryTextPlayer");
|
||||
updateBar(foreground, background, text, player.getPlayerStat("MaxSecondary").getAmount() + equipment["MP"], player.getPlayerStat("Secondary").getAmount());
|
||||
}
|
||||
|
||||
public void updateBar(GameObject bar, GameObject barBackground, GameObject textField, int maxValue, int minValue)
|
||||
@@ -475,22 +464,6 @@ namespace Assets.Scripts
|
||||
bar.GetComponent<RectTransform>().offsetMax = new Vector2(-change, bar.GetComponent<RectTransform>().offsetMax.y);
|
||||
}
|
||||
|
||||
public void updateFill(GameObject fill, GameObject textField, int maxValue, int minValue)
|
||||
{
|
||||
string text = minValue + "/" + maxValue;
|
||||
float percentage = 0;
|
||||
if (maxValue > 0)
|
||||
{
|
||||
percentage = (1 / (float)maxValue) * minValue;
|
||||
}
|
||||
|
||||
if (textField != null)
|
||||
{
|
||||
textField.GetComponent<Text>().text = text;
|
||||
}
|
||||
fill.GetComponent<Image>().fillAmount = percentage;
|
||||
}
|
||||
|
||||
public void openIntroduction()
|
||||
{
|
||||
GameObject.Find("AudioHandler").GetComponent<AudioHandler>().Start();
|
||||
|
||||
@@ -51,7 +51,6 @@ namespace Assets.Scripts
|
||||
statBoost = new Dictionary<string, int>();
|
||||
statBoost.Add("HP", 0);
|
||||
statBoost.Add("MP", 0);
|
||||
statBoost.Add("HPR", 0);
|
||||
statBoost.Add("MPR", 0);
|
||||
statBoost.Add("STR", 0);
|
||||
statBoost.Add("DEX", 0);
|
||||
@@ -76,8 +75,8 @@ namespace Assets.Scripts
|
||||
{
|
||||
slots[j].GetComponent<InventorySlot>().setItem(item, i);
|
||||
itemAdded = true;
|
||||
slots[j].GetComponent<RawImage>().color = item.rarityColor;
|
||||
slots[j].GetComponent<RawImage>().texture = item.image;
|
||||
slots[j].transform.Find("slotItem").GetComponent<RawImage>().color = item.rarityColor;
|
||||
slots[j].transform.Find("slotItem").GetComponent<RawImage>().texture = item.image;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -119,13 +118,13 @@ namespace Assets.Scripts
|
||||
item = slots[i].GetComponent<InventorySlot>().getItem(currentBag);
|
||||
if (item != null)
|
||||
{
|
||||
slots[i].GetComponent<RawImage>().color = item.rarityColor;
|
||||
slots[i].GetComponent<RawImage>().texture = item.image;
|
||||
slots[i].transform.Find("slotItem").GetComponent<RawImage>().color = item.rarityColor;
|
||||
slots[i].transform.Find("slotItem").GetComponent<RawImage>().texture = item.image;
|
||||
}
|
||||
else
|
||||
{
|
||||
slots[i].GetComponent<RawImage>().color = Color.white;
|
||||
slots[i].GetComponent<RawImage>().texture = null;
|
||||
slots[i].transform.Find("slotItem").GetComponent<RawImage>().color = new Color(1,1,1,0);
|
||||
slots[i].transform.Find("slotItem").GetComponent<RawImage>().texture = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -163,12 +162,12 @@ namespace Assets.Scripts
|
||||
item = slot.GetComponent<InventorySlot>().getEquip();
|
||||
if (item != null)
|
||||
{
|
||||
slot.GetComponent<RawImage>().color = item.rarityColor;
|
||||
slot.GetComponent<RawImage>().texture = item.image;
|
||||
slot.transform.Find("slotItem").GetComponent<RawImage>().color = item.rarityColor;
|
||||
slot.transform.Find("slotItem").GetComponent<RawImage>().texture = item.image;
|
||||
}
|
||||
else
|
||||
{
|
||||
slot.GetComponent<RawImage>().color = Color.white;
|
||||
slot.transform.Find("slotItem").GetComponent<RawImage>().color = Color.white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace Assets.Scripts
|
||||
}
|
||||
if (image != null)
|
||||
{
|
||||
gameObject.GetComponent<RawImage>().texture = image;
|
||||
gameObject.transform.Find("slotItem").GetComponent<RawImage>().texture = image;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,10 +48,6 @@ namespace Assets.Scripts
|
||||
{
|
||||
attributes.Add("MPR", int.Parse(json["MPR"].ToString()));
|
||||
}
|
||||
if (json["HPR"] != null)
|
||||
{
|
||||
attributes.Add("HPR", int.Parse(json["HPR"].ToString()));
|
||||
}
|
||||
if (json["MP"] != null)
|
||||
{
|
||||
attributes.Add("MP", int.Parse(json["MP"].ToString()));
|
||||
@@ -192,13 +188,6 @@ namespace Assets.Scripts
|
||||
attributes.Add("MP", Mathf.RoundToInt((float)(10 - (2 * i) + rand.Next(luck) * 0.1)));
|
||||
break;
|
||||
case 7:
|
||||
if (i == 0)
|
||||
{
|
||||
itemName = "health regeneration";
|
||||
}
|
||||
attributes.Add("HPR", Mathf.RoundToInt((float)(3 - (2 * i) + rand.Next(luck) * 0.1)));
|
||||
break;
|
||||
case 8:
|
||||
if (i == 0)
|
||||
{
|
||||
itemName = "mana regeneration";
|
||||
@@ -213,7 +202,6 @@ namespace Assets.Scripts
|
||||
{
|
||||
int bonus = rand.Next(luck);
|
||||
attributes.Add("MPR", Mathf.RoundToInt((float)(3 + bonus * 0.1)));
|
||||
attributes.Add("HPR", Mathf.RoundToInt((float)(3 + bonus * 0.1)));
|
||||
attributes.Add("MP", Mathf.RoundToInt((float)(3 + bonus * 0.1)));
|
||||
attributes.Add("HP", Mathf.RoundToInt((float)(3 + bonus * 0.1)));
|
||||
attributes.Add("STR", Mathf.RoundToInt((float)(3 + bonus * 0.1)));
|
||||
@@ -229,7 +217,7 @@ namespace Assets.Scripts
|
||||
int index = 0;
|
||||
while (true)
|
||||
{
|
||||
index = rand.Next(8) + 1;
|
||||
index = rand.Next(8);
|
||||
counter = 0;
|
||||
for (int j = 0; j < indexes.Length; j++)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Assets.Scripts
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (messages.Count > 0 && GameObject.Find("Fight").transform.localScale.Equals(new Vector3(0, 0, 0)))
|
||||
if (messages.Count > 0)
|
||||
{
|
||||
if (!isDisplaying)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Assets.Scripts.Player
|
||||
UIHandler uihandler;
|
||||
GameObject player;
|
||||
Vector2 rotation = Vector2.zero;
|
||||
public float mouseSpeed = 1; //the sensibility
|
||||
public float mouseSpeed = 100; //the sensibility
|
||||
public float controllerSpeed = 0.01f; //the sensibility
|
||||
float xMaxLimit = 50.0f;
|
||||
float xMinLimit = -50.0f;
|
||||
@@ -22,14 +22,14 @@ namespace Assets.Scripts.Player
|
||||
uihandler = GameObject.Find("UIHandler").GetComponent<UIHandler>();
|
||||
player = gameObject.transform.parent.gameObject;
|
||||
interact = GameObject.Find("pnlInteract");
|
||||
interact.transform.localScale = new Vector3(0,0,0);
|
||||
interact.transform.localScale = new Vector3(0, 0, 0);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
transform.position = new Vector3(transform.parent.transform.position.x, transform.position.y, transform.parent.transform.position.z);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
@@ -37,15 +37,19 @@ namespace Assets.Scripts.Player
|
||||
showInformation();
|
||||
}
|
||||
|
||||
public void lookAround(Vector2 view, bool isController){
|
||||
public void lookAround(Vector2 view, bool isController)
|
||||
{
|
||||
rotation.y += view.x;
|
||||
rotation.x += -view.y;
|
||||
rotation.x = Mathf.Clamp(rotation.x, xMinLimit, xMaxLimit);
|
||||
if(isController){
|
||||
transform.eulerAngles = (Vector2)rotation * controllerSpeed;
|
||||
//rotation.x = Mathf.Clamp(rotation.x, xMinLimit, xMaxLimit);
|
||||
if (isController)
|
||||
{
|
||||
transform.eulerAngles = rotation * (controllerSpeed * Time.deltaTime);
|
||||
}
|
||||
else{
|
||||
transform.eulerAngles = (Vector2)rotation * mouseSpeed;
|
||||
else
|
||||
{
|
||||
transform.eulerAngles = rotation * mouseSpeed;
|
||||
//TODO: Look at camera movement -> Not rly smooth. Weird drag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,14 +69,18 @@ namespace Assets.Scripts.Player
|
||||
void showInformation()
|
||||
{
|
||||
RaycastHit hit;
|
||||
interact.transform.localScale = new Vector3(0,0,0);
|
||||
interact.transform.localScale = new Vector3(0, 0, 0);
|
||||
if (Physics.Raycast(transform.position, transform.forward, out hit, Mathf.Infinity))
|
||||
{
|
||||
if (hit.collider.gameObject.tag.ToLower().Contains("object"))
|
||||
{
|
||||
string obj = hit.collider.gameObject.tag.Split(':')[1];
|
||||
if(hit.distance <= 3 && !obj.ToLower().Equals("house")){
|
||||
interact.transform.localScale = new Vector3(1,1,1);
|
||||
if (hit.distance <= 3 && !obj.ToLower().Equals("house"))
|
||||
{
|
||||
if (!uihandler.isPlayerInFight())
|
||||
{
|
||||
interact.transform.localScale = new Vector3(1, 1, 1);
|
||||
}
|
||||
}
|
||||
switch (obj.ToLower())
|
||||
{
|
||||
@@ -98,16 +106,20 @@ namespace Assets.Scripts.Player
|
||||
displayInformation(TextHandler.getText("chest"));
|
||||
break;
|
||||
case "ore":
|
||||
if(hit.collider.gameObject.name.ToLower().Contains("iron")){
|
||||
if (hit.collider.gameObject.name.ToLower().Contains("iron"))
|
||||
{
|
||||
displayInformation(TextHandler.translate("Iron ore"));
|
||||
}
|
||||
else if(hit.collider.gameObject.name.ToLower().Contains("gold")){
|
||||
else if (hit.collider.gameObject.name.ToLower().Contains("gold"))
|
||||
{
|
||||
displayInformation(TextHandler.translate("Gold ore"));
|
||||
}
|
||||
else if(hit.collider.gameObject.name.ToLower().Contains("copper")){
|
||||
else if (hit.collider.gameObject.name.ToLower().Contains("copper"))
|
||||
{
|
||||
displayInformation(TextHandler.translate("Copper ore"));
|
||||
}
|
||||
else if(hit.collider.gameObject.name.ToLower().Contains("tin")){
|
||||
else if (hit.collider.gameObject.name.ToLower().Contains("tin"))
|
||||
{
|
||||
displayInformation(TextHandler.translate("Tin ore"));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Assets.Scripts.Player
|
||||
{
|
||||
now = DateTime.Now;
|
||||
player.regainSecondary(inventory.getEquipmentBonus()["MPR"], inventory.getEquipmentBonus()["MP"]);
|
||||
player.healPlayer(inventory.getEquipmentBonus()["HPR"], inventory.getEquipmentBonus()["HP"]);
|
||||
player.healPlayer(4 - difficulty * 2, inventory.getEquipmentBonus()["HP"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -229,6 +229,12 @@ namespace Assets.Scripts.Player
|
||||
worldGenerator.createTile(new Vector3(1,0,1));
|
||||
}
|
||||
|
||||
if(col.name.Contains("House")){
|
||||
if(!col.transform.Find("Door").GetComponent<Door>().hasInteracted){
|
||||
transform.position = new Vector3(transform.position.x + 10, 10, transform.position.z);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void displayAction(int index, GameObject image, GameObject desc)
|
||||
@@ -260,7 +266,7 @@ namespace Assets.Scripts.Player
|
||||
|
||||
public void updateNameHUD(Text nameUI)
|
||||
{
|
||||
nameUI.text = player.getPlayerName() + "\n\r" + TextHandler.getText(player.getRace().racename) + "/" + TextHandler.getText(player.getClass().classname) + "\r\n Lvl. " + player.getStat("Level").getAmount();
|
||||
nameUI.text = player.getPlayerName() + "(Lvl. " + player.getStat("Level").getAmount() + ")";
|
||||
}
|
||||
|
||||
public void upgradeStrength()
|
||||
@@ -343,14 +349,21 @@ namespace Assets.Scripts.Player
|
||||
{
|
||||
if (player != null)
|
||||
{
|
||||
return player.takeDamage(amount, inventory.getEquipmentBonus()["DEX"], inventory.getEquipmentBonus()["INT"]);
|
||||
if(player.takeDamage(amount, inventory.getEquipmentBonus()["DEX"], inventory.getEquipmentBonus()["INT"])){
|
||||
audioHandler.playDamage();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int castSkill(int skillnumber)
|
||||
{
|
||||
return player.castSkill(skillnumber, inventory.getEquipmentBonus()["INT"], inventory.getEquipmentBonus()["STR"], inventory.getEquipmentBonus()["DEX"]);
|
||||
int damage = player.castSkill(skillnumber, inventory.getEquipmentBonus()["INT"], inventory.getEquipmentBonus()["STR"], inventory.getEquipmentBonus()["DEX"]);
|
||||
if(damage > 0){
|
||||
player.getSkill(skillnumber).playSound(audioHandler);
|
||||
}
|
||||
return damage;
|
||||
}
|
||||
|
||||
public void reduceCooldown(int skillnumber)
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Assets.Scripts.Player
|
||||
this.difficulty = difficulty;
|
||||
generateStats(false);
|
||||
generateSkills();
|
||||
EasterEggHandler.applyEasterEgg(this);
|
||||
EasterEggHandler.applyEasterEgg(playername);
|
||||
}
|
||||
|
||||
public PlayerObject()
|
||||
@@ -45,7 +45,6 @@ namespace Assets.Scripts.Player
|
||||
stats.Add("Intelligence", new PlayerStat("Intelligence", 5, "The current intelligence of the player"));
|
||||
stats.Add("Experience", new PlayerStat("Experience", 0, "The current experience of the player"));
|
||||
stats.Add("MaxExperience", new PlayerStat("MaxExperience", 10, "The current max experience of the player"));
|
||||
stats.Add("HealthRegen", new PlayerStat("HealthRegen", 30 / (difficulty + 1), "The current health regen of the player"));
|
||||
stats.Add("SecondaryRegen", new PlayerStat("SecondaryRegen", 5, "The current secondary regen of the player"));
|
||||
stats.Add("Level", new PlayerStat("Level", 0, "The current level of the player"));
|
||||
stats.Add("Luck", new PlayerStat("Luck", 20 - (difficulty * 5), "The current luck of the player"));
|
||||
@@ -107,7 +106,6 @@ namespace Assets.Scripts.Player
|
||||
stats["MaxExperience"].setAmount((int)json["maxExperience"]);
|
||||
stats["Points"].setAmount((int)json["points"]);
|
||||
stats["Luck"].setAmount((int)json["luck"]);
|
||||
stats["HealthRegen"].setAmount((int)json["healthRegen"]);
|
||||
stats["SecondaryRegen"].setAmount((int)json["secondaryRegen"]);
|
||||
stats["Killcount"].setAmount((int)json["killcount"]);
|
||||
|
||||
@@ -176,9 +174,9 @@ namespace Assets.Scripts.Player
|
||||
}
|
||||
}
|
||||
|
||||
public void healPlayer(int equipRegen, int equipStat)
|
||||
public void healPlayer(int regeneration, int equipStat)
|
||||
{
|
||||
stats["Health"].changeAmount(stats["HealthRegen"].getAmount() + equipRegen);
|
||||
stats["Health"].changeAmount(regeneration);
|
||||
if (stats["Health"].getAmount() >= stats["MaxHealth"].getAmount() + equipStat)
|
||||
{
|
||||
stats["Health"].setAmount(stats["MaxHealth"].getAmount() + equipStat);
|
||||
@@ -260,7 +258,6 @@ namespace Assets.Scripts.Player
|
||||
damage = damage / 2;
|
||||
break;
|
||||
}
|
||||
//TODO: Let caller of this method handle audio if damage is higher than 0 // skills[index].playSound(audioHandler);
|
||||
}
|
||||
return damage;
|
||||
}
|
||||
@@ -299,7 +296,6 @@ namespace Assets.Scripts.Player
|
||||
if (rand.Next(1, 101) > dodgeChance)
|
||||
{
|
||||
stats["Health"].changeAmount(-amount);
|
||||
//TODO: Let caller of this method handle audio // audioHandler.playDamage();
|
||||
}
|
||||
}
|
||||
return stats["Health"].getAmount() <= 0;
|
||||
@@ -370,7 +366,6 @@ namespace Assets.Scripts.Player
|
||||
result = result + FileHandler.generateJSON("race", "\"" + race.racename + "\"") + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("role", "\"" + role.classname + "\"") + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("points", stats["Points"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("healthRegen", stats["HealthRegen"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("secondaryRegen", stats["SecondaryRegen"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("isDodging", "\"" + isDodging + "\"") + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("killcount", stats["Killcount"].getAmount()) + ",\r\n";
|
||||
|
||||
@@ -36,16 +36,30 @@ public class Tile : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<Vector3> getSpawnLocations()
|
||||
{
|
||||
List<Vector3> list = new List<Vector3>();
|
||||
int objectAmount = rand.Next(20, 101);
|
||||
int objectAmount = objectAmount = rand.Next(40, 151);
|
||||
int iterations = 0;
|
||||
Vector3 newPoint;
|
||||
bool canSpawn;
|
||||
while(list.Count < objectAmount){
|
||||
iterations++;
|
||||
canSpawn = true;
|
||||
newPoint = new Vector3(rand.Next(-40, 40) + 100 * position.x, 50, rand.Next(-40, 40) + 100 * position.z);
|
||||
if (!list.Contains(newPoint))
|
||||
{
|
||||
foreach(Vector3 vector in list){
|
||||
if(Vector3.Distance(vector, newPoint) < 10){
|
||||
canSpawn = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(canSpawn && !list.Contains(newPoint)){
|
||||
list.Add(newPoint);
|
||||
iterations = 0;
|
||||
}
|
||||
if(iterations >= 1000){
|
||||
break;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
@@ -60,19 +74,6 @@ public class Tile : MonoBehaviour
|
||||
GameObject content = contentGenerator.GetComponent<ContentGenerator>().generateContent(tiletype.ToString());
|
||||
if (content != null)
|
||||
{
|
||||
float verticeX = position.x / 10;
|
||||
float verticeZ = position.z / 10;
|
||||
|
||||
Vector3 vertice = new Vector3(Mathf.Round(verticeX), 0, Mathf.Round(verticeZ));
|
||||
Vector3[] vertices = gameObject.GetComponent<MeshFilter>().mesh.vertices;
|
||||
|
||||
foreach(Vector3 v in vertices){
|
||||
if(v.x == vertice.x && v.z == vertice.z){
|
||||
position.y = v.y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
GameObject obj = Instantiate(content, position, Quaternion.identity, gameObject.transform);
|
||||
if (obj.tag.Contains("Enemy"))
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ public class WorldGenerator : MonoBehaviour
|
||||
Destroy(tile);
|
||||
}
|
||||
}
|
||||
player.transform.position = new Vector3(0, 50f, 0);
|
||||
player.transform.position = new Vector3(0, 50, 0);
|
||||
player.transform.rotation = Quaternion.identity;
|
||||
OnEnable();
|
||||
this.cityAmount = cityAmount;
|
||||
@@ -95,7 +95,6 @@ public class WorldGenerator : MonoBehaviour
|
||||
noise.applyNoise(newTile, tiles, pos);
|
||||
newTile.GetComponent<Tile>().generateTile(pos, (TileType)Enum.Parse(typeof(TileType), newTile.name.Split("_")[0]));
|
||||
tiles.Add(pos, newTile);
|
||||
//currentTile = newTile;
|
||||
GameObject.Find("QuestLog").GetComponent<QuestLog>().updateQuests("find", newTile, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user