1
0
Fork 0

Player spawning in start room | Player class | Objective usage changed

This commit is contained in:
Saibotk 2018-04-21 18:45:26 +02:00
parent 947b6d4e84
commit 9a8c3858c1
8 changed files with 255 additions and 495 deletions

View file

@ -36,6 +36,7 @@ GameObject:
- component: {fileID: 4079161515917916}
- component: {fileID: 50783223838863924}
- component: {fileID: 114874769993434856}
- component: {fileID: 114835806183609276}
m_Layer: 0
m_Name: Player
m_TagString: Player
@ -120,6 +121,17 @@ Rigidbody2D:
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!114 &114835806183609276
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1679161327080020}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4a1319c82afce6e47b9ec0980f156e39, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &114874769993434856
MonoBehaviour:
m_ObjectHideFlags: 1
@ -131,9 +143,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2cf81aa4a8d45468f8184f8d5862d7eb, type: 3}
m_Name:
m_EditorClassIdentifier:
power: 3.5
turnpower: 2.5
curveSpeed: 0.45
acceleration: 3
friction: 0.1
turnSpeed: 2
drift: 1
brake: 2
--- !u!212 &212241819326847048
SpriteRenderer:
m_ObjectHideFlags: 1

View file

@ -42,6 +42,24 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1210523432952560
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4896748037289080}
- component: {fileID: 114620228456935526}
- component: {fileID: 61641230072611188}
- component: {fileID: 61881867638551418}
m_Layer: 0
m_Name: Door
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1333566648069926
GameObject:
m_ObjectHideFlags: 0
@ -63,23 +81,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1390849000767014
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4576663487368228}
- component: {fileID: 114777089437464196}
- component: {fileID: 61347333512881174}
m_Layer: 0
m_Name: UpperDoor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1394898907781064
GameObject:
m_ObjectHideFlags: 0
@ -163,7 +164,7 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4576663487368228}
- {fileID: 4896748037289080}
m_Father: {fileID: 4524829645232432}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -183,19 +184,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4576663487368228
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1390849000767014}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 9.06, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4433182163931000}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4615890080890712
Transform:
m_ObjectHideFlags: 1
@ -222,6 +210,19 @@ Transform:
m_Father: {fileID: 4405955685927858}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4896748037289080
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1210523432952560}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 9, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4433182163931000}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &61170234429133000
BoxCollider2D:
m_ObjectHideFlags: 1
@ -247,31 +248,6 @@ BoxCollider2D:
serializedVersion: 2
m_Size: {x: 1.0532589, y: 17.203735}
m_EdgeRadius: 0
--- !u!61 &61347333512881174
BoxCollider2D:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1390849000767014}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: -0.37311125, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 3.0254688, y: 1}
m_EdgeRadius: 0
--- !u!61 &61365825193936666
BoxCollider2D:
m_ObjectHideFlags: 1
@ -347,6 +323,56 @@ BoxCollider2D:
serializedVersion: 2
m_Size: {x: 0.9467335, y: 17.150434}
m_EdgeRadius: 0
--- !u!61 &61641230072611188
BoxCollider2D:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1210523432952560}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 1
serializedVersion: 2
m_Size: {x: 3, y: 1}
m_EdgeRadius: 0
--- !u!61 &61881867638551418
BoxCollider2D:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1210523432952560}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 3, y: 1}
m_EdgeRadius: 0
--- !u!61 &61990218022873102
BoxCollider2D:
m_ObjectHideFlags: 1
@ -372,12 +398,12 @@ BoxCollider2D:
serializedVersion: 2
m_Size: {x: 11.34058, y: 1.0000019}
m_EdgeRadius: 0
--- !u!114 &114777089437464196
--- !u!114 &114620228456935526
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1390849000767014}
m_GameObject: {fileID: 1210523432952560}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8b8cc30ac6e59724bba6536a17fbf027, type: 3}
@ -397,7 +423,7 @@ MonoBehaviour:
Width: 0
Height: 0
doorsRootObject: {fileID: 1394898907781064}
objective: {fileID: 0}
spawnpointRootObject: {fileID: 0}
--- !u!212 &212881422167649272
SpriteRenderer:
m_ObjectHideFlags: 1

View file

@ -113,299 +113,84 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &375610321
GameObject:
--- !u!1001 &81960866
Prefab:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1029356843942810, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 375610322}
m_Layer: 0
m_Name: Graphics
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &375610322
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4254889038956124, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 375610321}
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_Children:
- {fileID: 870646216}
m_Father: {fileID: 766094371}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &766094364
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1333566648069926, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 766094371}
- component: {fileID: 766094370}
- component: {fileID: 766094369}
- component: {fileID: 766094368}
- component: {fileID: 766094367}
- component: {fileID: 766094366}
- component: {fileID: 766094365}
m_Layer: 0
m_Name: StartingRoom
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!61 &766094365
BoxCollider2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 61990218022873102, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 766094364}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 6.662739, y: 9.487714}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 11.34058, y: 1.0000019}
m_EdgeRadius: 0
--- !u!61 &766094366
BoxCollider2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 61365825193936666, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 766094364}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 1
m_UsedByComposite: 0
m_Offset: {x: -0.63960123, y: -7.9419603}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 25.94526, y: 0.8934002}
m_EdgeRadius: 0
--- !u!61 &766094367
BoxCollider2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 61170234429133000, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 766094364}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: -13.085601, y: 0.74622536}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1.0532589, y: 17.203735}
m_EdgeRadius: 0
--- !u!61 &766094368
BoxCollider2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 61466659272242130, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 766094364}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: -7.702084, y: 9.487711}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 11.820292, y: 1}
m_EdgeRadius: 0
--- !u!61 &766094369
BoxCollider2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 61627547681701250, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 766094364}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 11.85966, y: 0.8794775}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.9467335, y: 17.150434}
m_EdgeRadius: 0
--- !u!114 &766094370
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4524829645232432, guid: 212457bb2a8fabb44b1000b6d61dde66, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4524829645232432, guid: 212457bb2a8fabb44b1000b6d61dde66, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4524829645232432, guid: 212457bb2a8fabb44b1000b6d61dde66, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4524829645232432, guid: 212457bb2a8fabb44b1000b6d61dde66, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4524829645232432, guid: 212457bb2a8fabb44b1000b6d61dde66, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4524829645232432, guid: 212457bb2a8fabb44b1000b6d61dde66, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4524829645232432, guid: 212457bb2a8fabb44b1000b6d61dde66, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4524829645232432, guid: 212457bb2a8fabb44b1000b6d61dde66, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 114795477922050694, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
propertyPath: spawnpointRootObject
value:
objectReference: {fileID: 893869449}
- target: {fileID: 61365825193936666, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
propertyPath: m_UsedByEffector
value: 0
objectReference: {fileID: 0}
- target: {fileID: 61466659272242130, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
propertyPath: m_Offset.x
value: -7.5491962
objectReference: {fileID: 0}
- target: {fileID: 61466659272242130, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
propertyPath: m_Size.x
value: 12.126068
objectReference: {fileID: 0}
- target: {fileID: 61990218022873102, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
propertyPath: m_Offset.x
value: 6.907359
objectReference: {fileID: 0}
- target: {fileID: 61990218022873102, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
propertyPath: m_Size.x
value: 10.851339
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 212457bb2a8fabb44b1000b6d61dde66, type: 2}
m_IsPrefabParent: 0
--- !u!114 &766094370 stripped
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114795477922050694, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 766094364}
m_Enabled: 1
m_EditorHideFlags: 0
m_PrefabInternal: {fileID: 81960866}
m_Script: {fileID: 11500000, guid: a031ae543e3871f4da5b6e402291b6f6, type: 3}
m_Name:
m_EditorClassIdentifier:
Width: 0
Height: 0
doorsRootObject: {fileID: 1000574537}
spawnpointRootObject: {fileID: 0}
--- !u!4 &766094371
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4524829645232432, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 766094364}
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_Children:
- {fileID: 893869450}
- {fileID: 375610322}
- {fileID: 1000574538}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &870646215
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1093703178199906, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 870646216}
- component: {fileID: 870646217}
m_Layer: 0
m_Name: ground
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &870646216
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4615890080890712, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 870646215}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.598, y: 0.801, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 375610322}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &870646217
SpriteRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 212881422167649272, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 870646215}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: a43209b9635fcc2409b99ae1bb5dffe6, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 2
m_Size: {x: 47.91742, y: 32.938805}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
--- !u!1 &881384367
GameObject:
m_ObjectHideFlags: 0
@ -487,145 +272,11 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &893869449
--- !u!1 &893869449 stripped
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1560863483719772, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 893869450}
m_Layer: 0
m_Name: Spawnpoints
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &893869450
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4405955685927858, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 893869449}
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_Children:
- {fileID: 1433326197}
m_Father: {fileID: 766094371}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1000574537
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1394898907781064, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1000574538}
m_Layer: 0
m_Name: Doors
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1000574538
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4433182163931000, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1000574537}
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_Children:
- {fileID: 1583588781}
m_Father: {fileID: 766094371}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1433326196
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1528048736566048, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1433326197}
m_Layer: 0
m_Name: Spawn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1433326197
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4871197587417858, guid: 212457bb2a8fabb44b1000b6d61dde66,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1433326196}
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_Children: []
m_Father: {fileID: 893869450}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1583588780
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1000574538}
m_Modifications:
- target: {fileID: 4708397045567336, guid: 88e4526bbc633401ebdaaffa8a16c3aa, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4708397045567336, guid: 88e4526bbc633401ebdaaffa8a16c3aa, type: 2}
propertyPath: m_LocalPosition.y
value: 9
objectReference: {fileID: 0}
- target: {fileID: 4708397045567336, guid: 88e4526bbc633401ebdaaffa8a16c3aa, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4708397045567336, guid: 88e4526bbc633401ebdaaffa8a16c3aa, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4708397045567336, guid: 88e4526bbc633401ebdaaffa8a16c3aa, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4708397045567336, guid: 88e4526bbc633401ebdaaffa8a16c3aa, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4708397045567336, guid: 88e4526bbc633401ebdaaffa8a16c3aa, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4708397045567336, guid: 88e4526bbc633401ebdaaffa8a16c3aa, type: 2}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 88e4526bbc633401ebdaaffa8a16c3aa, type: 2}
m_IsPrefabParent: 0
--- !u!4 &1583588781 stripped
Transform:
m_PrefabParentObject: {fileID: 4708397045567336, guid: 88e4526bbc633401ebdaaffa8a16c3aa,
type: 2}
m_PrefabInternal: {fileID: 1583588780}
m_PrefabInternal: {fileID: 81960866}
--- !u!1 &2063368131
GameObject:
m_ObjectHideFlags: 0
@ -666,3 +317,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 87d25c2cd3eb97749b79f2cb5f7c5cea, type: 3}
m_Name:
m_EditorClassIdentifier:
playerPrefab: {fileID: 1679161327080020, guid: 3d1911457c1e44f53b6b4044334db52f,
type: 2}
start: {fileID: 766094370}

View file

@ -0,0 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : Mob {
public Player() : base(null, 100 )
{
}
}

View file

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

View file

@ -3,20 +3,40 @@ using System.Collections.Generic;
using UnityEngine;
public class GameController : MonoBehaviour {
[SerializeField]
GameObject playerPrefab;
[SerializeField]
private Room start;
private Room finish;
private bool engineInitDone;
public static GameController instance;
public GameController()
{
instance = this;
}
public enum GameState { UNSET, INIT, STARTING, RUNNING, ENDED };
private GameState state = GameState.UNSET;
// Use this for initialization
void Start () {
ChangeState(GameState.INIT);
//ChangeState(GameState.INIT);
}
// Update is called once per frame
void Update () {
}
if (!engineInitDone)
{
engineInitDone = true;
Debug.Log("First Frame");
ChangeState(GameState.INIT);
}
}
void ChangeState(GameState nextState) {
if(nextState != state) {
@ -30,9 +50,11 @@ public class GameController : MonoBehaviour {
{
case GameState.INIT:
Init();
ChangeState(GameState.STARTING);
break;
case GameState.STARTING:
Starting();
ChangeState(GameState.RUNNING);
break;
case GameState.RUNNING:
Running();
@ -49,12 +71,17 @@ public class GameController : MonoBehaviour {
private void Init()
{
ChangeState(GameState.STARTING);
List<GameObject> tmp = new List<GameObject>
{
playerPrefab
};
start.SetObjective(new EntityObjective(start, tmp));
start.OnPlayerEnter();
}
private void Starting()
{
ChangeState(GameState.RUNNING);
}
private void Running()

View file

@ -15,12 +15,13 @@ public class EntityObjective : Objective{
}
// Activates the objective to start progresstracking
public void Activate()
public override void Activate()
{
Random newRand = new Random ();
Debug.Log("Activate");
foreach (GameObject i in prefabList)
{
Debug.Log("Instantiating Prefab");
GameObject tempObject = GameObject.Instantiate (i);
tempObject.transform.position = spawnPointList [Random.Range (0, spawnPointList.Count)].position;
}

View file

@ -5,7 +5,7 @@ using UnityEngine;
public class Room : MonoBehaviour {
[SerializeField]
int Width, Height; // Gridsize for Generation
int width, height; // Gridsize for Generation
List<Door> doors;
List<Transform> spawnpoints;
@ -26,13 +26,23 @@ public class Room : MonoBehaviour {
{
doors.Add(d);
}
Debug.Log("Doors in Room: " + doors.Count);
spawnpoints = new List<Transform>();
foreach (Transform t in spawnpointRootObject.GetComponentsInChildren<Transform>())
{
spawnpoints.Add(t);
if( t.gameObject != spawnpointRootObject)
{
spawnpoints.Add(t);
}
}
Debug.Log("Spawnpoints in Room: " + spawnpoints.Count);
}
public void SetObjective(Objective o)
{
objective = o;
}
public void Lock()
{
@ -50,6 +60,11 @@ public class Room : MonoBehaviour {
}
}
public void OnPlayerEnter()
{
objective.Activate();
}
public List<Transform> GetSpawnpoints()
{
return spawnpoints;