started ReReReWork

This commit is contained in:
DerTyp187
2021-10-04 14:32:31 +02:00
parent 75a6f34ece
commit 4617e702a7
11 changed files with 647 additions and 136 deletions

View File

@@ -144,20 +144,6 @@ Rigidbody:
m_Interpolate: 0
m_Constraints: 112
m_CollisionDetection: 1
--- !u!114 &95348673
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 95348668}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2fe01a752f991734aa307cc7b7665015, type: 3}
m_Name:
m_EditorClassIdentifier:
terrain: {fileID: 1417065444}
prefab: {fileID: 3267014614944694456, guid: 7360393ab87b77243835eef567656173, type: 3}
--- !u!4 &95348674 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8390537188327133022, guid: 6a86db7765f277243b912c20f451dc47, type: 3}
@@ -1144,6 +1130,63 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3f1735c997ccb39408dfa8bf3790319f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &5360703793485496321
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5360703794841841442, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_Name
value: TestHouse
objectReference: {fileID: 0}
- target: {fileID: 5360703794841841444, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_RootOrder
value: 10
objectReference: {fileID: 0}
- target: {fileID: 5360703794841841444, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_LocalPosition.x
value: 4.299156
objectReference: {fileID: 0}
- target: {fileID: 5360703794841841444, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_LocalPosition.y
value: 27.5
objectReference: {fileID: 0}
- target: {fileID: 5360703794841841444, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_LocalPosition.z
value: 53.029934
objectReference: {fileID: 0}
- target: {fileID: 5360703794841841444, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5360703794841841444, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5360703794841841444, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5360703794841841444, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5360703794841841444, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5360703794841841444, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5360703794841841444, guid: bfe47c8c98918254086591539306d4fa, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bfe47c8c98918254086591539306d4fa, type: 3}
--- !u!1001 &7029954222161724659
PrefabInstance:
m_ObjectHideFlags: 0
@@ -1209,6 +1252,10 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 95348673, guid: 6a86db7765f277243b912c20f451dc47, type: 3}
propertyPath: prefab
value:
objectReference: {fileID: 5360703794841841442, guid: bfe47c8c98918254086591539306d4fa, type: 3}
- target: {fileID: 95348673, guid: 6a86db7765f277243b912c20f451dc47, type: 3}
propertyPath: terrain
value:

View File

@@ -6,13 +6,57 @@ public abstract class Building : MonoBehaviour
{
public string title = "New Building";
public string description = "A cool new building";
public Material blueprintMat;
public Material collisionMat;
public abstract void OnStartUp();
public enum BuildingType
{
Housing,
Storage,
Decoration
}
public BuildingType buildingType;
private void Start()
{
gameObject.AddComponent<BuildingBlueprint>();
gameObject.GetComponent<BuildingBlueprint>().blueprintMat = blueprintMat;
gameObject.GetComponent<BuildingBlueprint>().collisionMat = collisionMat;
FindChildByTag("Building").SetActive(false);
FindChildByTag("Blueprint").SetActive(true);
OnStartUp();
}
public void EndBlueprint(bool place = false)
{
if (place)
{
FindChildByTag("Blueprint").SetActive(false);
FindChildByTag("Building").SetActive(true);
Destroy(gameObject.GetComponent<BuildingBlueprint>());
}
else
{
Destroy(gameObject);
}
}
public GameObject FindChildByTag(string tag)
{
foreach(Transform child in gameObject.transform)
{
if(child.tag == tag)
{
return child.gameObject;
}
}
return null;
}
}

View File

@@ -2,41 +2,25 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class BuildingBlueprint : MonoBehaviour
public class BuildingBlueprint : MonoBehaviour
{
public bool isColliding;
public GameObject constructionPrefab;
public Material collisionMat;
public Material blueprintMat;
private GameObject terrain;
private Canvas hud;
private bool isColliding;
Ray ray;
public abstract void Init();
public abstract void WhileColliding();
public abstract void WhileNotColliding();
private void Start()
{
hud = GameObject.Find("HUD").GetComponent<Canvas>(); //Get HUD Canvas
terrain = GameObject.FindGameObjectWithTag("Terrain"); //Get Terrain
//Bug Fix Blueprints already existing
//Delete/CleanUp all objs with tag "Blueprint"
GameObject[] blueprints = GameObject.FindGameObjectsWithTag("Blueprint");
foreach (GameObject blueprint in blueprints)
Destroy(blueprint);
gameObject.tag = "Blueprint"; //Give Gameobject the tag "Blueprint" (after deleting all objs with this tag)
hud.enabled = false; //Hide HUD
Init(); //Call init callback function for children
}
public void Update()
@@ -44,20 +28,37 @@ public abstract class BuildingBlueprint : MonoBehaviour
FollowMouse();
Rotate();
//Collinding Callbacks
//COLLISION
if (isColliding)
{
WhileColliding();
{
MeshRenderer[] mr = gameObject.GetComponent<Building>().FindChildByTag("Blueprint").GetComponentsInChildren<MeshRenderer>();
foreach (MeshRenderer r in mr)
{
r.material = collisionMat;
}
}
else
{
WhileNotColliding();
MeshRenderer[] mr = gameObject.GetComponent<Building>().FindChildByTag("Blueprint").GetComponentsInChildren<MeshRenderer>();
foreach (MeshRenderer r in mr)
{
r.material = blueprintMat;
}
}
//PLACE
if (Input.GetMouseButtonDown(0) && !isColliding)
{
Place();
gameObject.GetComponent<Building>().EndBlueprint(true);
hud.enabled = true;
}
if (Input.GetButtonDown("Build"))
{
gameObject.GetComponent<Building>().EndBlueprint(false);
hud.enabled = true;
}
}
@@ -108,13 +109,6 @@ public abstract class BuildingBlueprint : MonoBehaviour
}
}
void Place()
{
Instantiate(constructionPrefab, transform.position, transform.rotation);
Destroy(this.gameObject);
hud.enabled = true;
}
//Collision
public void OnCollisionEnter(Collision c)

View File

@@ -1,31 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HouseBlueprint : BuildingBlueprint
{
private Transform houseCube;
public override void Init()
{
//Haus cube <20>m Obj -> hier wird es benutzt zum material <20>ndern
houseCube = gameObject.transform.Find("HouseCube");
}
public override void WhileColliding()
{
//Wenn es collidet soll der HouseCube IM Object ver<65>ndert werden!
//Das ist bei jedem Building anders
houseCube.GetComponent<MeshRenderer>().material = collisionMat;
}
public override void WhileNotColliding()
{
//Das selbe wie bei "WhileColliding"
houseCube.GetComponent<MeshRenderer>().material = blueprintMat;
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6d49e2868fa536c4fac8ec278501f38b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -4,7 +4,7 @@ using UnityEngine;
public class HouseBuildingScript : Building
{
private void Start()
public override void OnStartUp()
{
title = "House";
description = "A place to live in";

View File

@@ -1,34 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WarehouseBlueprint : BuildingBlueprint
{
private MeshRenderer[] childrenMeshRenderer;
public override void Init()
{
//Haus cube <20>m Obj -> hier wird es benutzt zum material <20>ndern
childrenMeshRenderer = gameObject.GetComponentsInChildren<MeshRenderer>();
}
public override void WhileColliding()
{
//Wenn es collidet soll der HouseCube IM Object ver<65>ndert werden!
//Das ist bei jedem Building anders
foreach(MeshRenderer r in childrenMeshRenderer)
{
r.material = collisionMat;
}
}
public override void WhileNotColliding()
{
//Das selbe wie bei "WhileColliding"
foreach (MeshRenderer r in childrenMeshRenderer)
{
r.material = blueprintMat;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: c08df78a8e2e51d4c80019a27fc2cc5c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,503 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5360703792772738077
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5360703792772738076}
- component: {fileID: 5360703792772738078}
- component: {fileID: 5360703792772738079}
m_Layer: 9
m_Name: HouseCube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5360703792772738076
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703792772738077}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 64.59468, y: 44, z: 20.101233}
m_Children: []
m_Father: {fileID: 5360703793539700796}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &5360703792772738078
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703792772738077}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &5360703792772738079
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703792772738077}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 78d3985cb7b88204b930cd05567c0c61, 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: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &5360703793236804447
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5360703793236804446}
- component: {fileID: 5360703793236804450}
- component: {fileID: 5360703793236804451}
m_Layer: 7
m_Name: HouseCube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5360703793236804446
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703793236804447}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 64.59468, y: 44, z: 20.101233}
m_Children: []
m_Father: {fileID: 5360703794001325739}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &5360703793236804450
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703793236804447}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &5360703793236804451
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703793236804447}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &5360703793423176871
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5360703793423176870}
- component: {fileID: 5360703793423176874}
- component: {fileID: 5360703793423176875}
- component: {fileID: 5360703793423176872}
- component: {fileID: 5360703793423176873}
m_Layer: 0
m_Name: Sign
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5360703793423176870
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703793423176871}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 32.34, y: 10, z: 6.38}
m_LocalScale: {x: 0.61721, y: 1.3248, z: 2.108}
m_Children: []
m_Father: {fileID: 5360703794001325739}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &5360703793423176874
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703793423176871}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &5360703793423176875
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703793423176871}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 1fae3d354d8f44b438d51fbc992ccae4, 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: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &5360703793423176872
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703793423176871}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &5360703793423176873
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703793423176871}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0b83755523bca294c8ebaacb9bfd6f02, type: 3}
m_Name:
m_EditorClassIdentifier:
interactionType: 0
--- !u!1 &5360703793539700797
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5360703793539700796}
m_Layer: 9
m_Name: HouseBlueprint
m_TagString: Blueprint
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5360703793539700796
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703793539700797}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5113401, y: 0.64607, z: 0.70913}
m_Children:
- {fileID: 5360703792772738076}
- {fileID: 5360703794877200717}
m_Father: {fileID: 5360703794841841444}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &5360703794001325736
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5360703794001325739}
- component: {fileID: 5360703794001325738}
m_Layer: 0
m_Name: House
m_TagString: Building
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5360703794001325739
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703794001325736}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5113401, y: 0.64607, z: 0.70913}
m_Children:
- {fileID: 5360703793236804446}
- {fileID: 5360703793423176870}
m_Father: {fileID: 5360703794841841444}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!54 &5360703794001325738
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703794001325736}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 126
m_CollisionDetection: 0
--- !u!1 &5360703794841841442
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5360703794841841444}
- component: {fileID: 5360703794841841445}
- component: {fileID: 5360703794841841446}
m_Layer: 0
m_Name: TestHouse
m_TagString: Building
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5360703794841841444
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703794841841442}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 4.299156, y: 27.5, z: 53.029934}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5360703794001325739}
- {fileID: 5360703793539700796}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &5360703794841841445
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703794841841442}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 255558bfba6648641822c24b4555e7db, type: 3}
m_Name:
m_EditorClassIdentifier:
title: New Building
description: A cool new building
blueprintMat: {fileID: 2100000, guid: 78d3985cb7b88204b930cd05567c0c61, type: 2}
collisionMat: {fileID: 2100000, guid: a1e8fb1ea637c0e45bed70dd7d1feaab, type: 2}
buildingType: 0
--- !u!65 &5360703794841841446
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703794841841442}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &5360703794877200714
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5360703794877200717}
- component: {fileID: 5360703794877200719}
- component: {fileID: 5360703794877200716}
m_Layer: 9
m_Name: Sign
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5360703794877200717
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703794877200714}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 32.34, y: 10, z: 6.38}
m_LocalScale: {x: 0.61721, y: 1.3248, z: 2.108}
m_Children: []
m_Father: {fileID: 5360703793539700796}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &5360703794877200719
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703794877200714}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &5360703794877200716
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5360703794877200714}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 78d3985cb7b88204b930cd05567c0c61, 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: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}

View File

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

View File

@@ -7,7 +7,10 @@ public class StorageBuilding : Building
[SerializeField] private List<Item> inventory = new List<Item>();
public int inventorySpace;
public override void OnStartUp()
{
}
public void Awake()
{