edge colliders on camera
animals are moving now (very bad => will get better) set BasicTile Collider2D isTrigger to false
This commit is contained in:
parent
f454e82aab
commit
3a564aa909
7 changed files with 380 additions and 86 deletions
|
|
@ -100,7 +100,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!4 &2275953190273124041
|
--- !u!4 &2275953190273124041
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -154,9 +154,9 @@ SpriteRenderer:
|
||||||
m_AutoUVMaxDistance: 0.5
|
m_AutoUVMaxDistance: 0.5
|
||||||
m_AutoUVMaxAngle: 89
|
m_AutoUVMaxAngle: 89
|
||||||
m_LightmapParameters: {fileID: 0}
|
m_LightmapParameters: {fileID: 0}
|
||||||
m_SortingLayerID: -278359049
|
m_SortingLayerID: 0
|
||||||
m_SortingLayer: 2
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 100
|
m_SortingOrder: 0
|
||||||
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 0.41568628}
|
m_Color: {r: 1, g: 1, b: 1, a: 0.41568628}
|
||||||
m_FlipX: 0
|
m_FlipX: 0
|
||||||
|
|
@ -242,7 +242,7 @@ SpriteRenderer:
|
||||||
m_SortingLayer: 1
|
m_SortingLayer: 1
|
||||||
m_SortingOrder: 1
|
m_SortingOrder: 1
|
||||||
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 0.49803922, g: 0.49803922, b: 1, a: 0.57254905}
|
||||||
m_FlipX: 0
|
m_FlipX: 0
|
||||||
m_FlipY: 0
|
m_FlipY: 0
|
||||||
m_DrawMode: 0
|
m_DrawMode: 0
|
||||||
|
|
@ -351,7 +351,7 @@ BoxCollider2D:
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_Density: 1
|
m_Density: 1
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_IsTrigger: 0
|
m_IsTrigger: 1
|
||||||
m_UsedByEffector: 0
|
m_UsedByEffector: 0
|
||||||
m_UsedByComposite: 0
|
m_UsedByComposite: 0
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ SpriteRenderer:
|
||||||
m_LightmapParameters: {fileID: 0}
|
m_LightmapParameters: {fileID: 0}
|
||||||
m_SortingLayerID: -278359049
|
m_SortingLayerID: -278359049
|
||||||
m_SortingLayer: 2
|
m_SortingLayer: 2
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 1
|
||||||
m_Sprite: {fileID: 21300000, guid: e2bde586482642d44a270276574c0129, type: 3}
|
m_Sprite: {fileID: 21300000, guid: e2bde586482642d44a270276574c0129, type: 3}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_FlipX: 0
|
m_FlipX: 0
|
||||||
|
|
@ -107,7 +107,7 @@ Rigidbody2D:
|
||||||
m_Interpolate: 0
|
m_Interpolate: 0
|
||||||
m_SleepingMode: 1
|
m_SleepingMode: 1
|
||||||
m_CollisionDetection: 0
|
m_CollisionDetection: 0
|
||||||
m_Constraints: 0
|
m_Constraints: 4
|
||||||
--- !u!60 &2510115116361252818
|
--- !u!60 &2510115116361252818
|
||||||
PolygonCollider2D:
|
PolygonCollider2D:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -154,3 +154,5 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 36cb7b1a78935094f84a770ea77f308c, type: 3}
|
m_Script: {fileID: 11500000, guid: 36cb7b1a78935094f84a770ea77f308c, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
animalSprite: {fileID: 0}
|
||||||
|
movementSpeed: 20
|
||||||
|
|
|
||||||
|
|
@ -405,6 +405,64 @@ RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 1324337007}
|
m_PrefabInstance: {fileID: 1324337007}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &67384320
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 67384321}
|
||||||
|
- component: {fileID: 67384323}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Left
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &67384321
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 67384320}
|
||||||
|
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: 1130879221}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!61 &67384323
|
||||||
|
BoxCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 67384320}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_UsedByComposite: 0
|
||||||
|
m_Offset: {x: -9.8, 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: 1, y: 12}
|
||||||
|
m_EdgeRadius: 0
|
||||||
--- !u!224 &94990416 stripped
|
--- !u!224 &94990416 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
|
|
@ -1367,63 +1425,6 @@ RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 1868238650}
|
m_PrefabInstance: {fileID: 1868238650}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1001 &397546377
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
m_TransformParent: {fileID: 0}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 2510115116361252817, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: Cow
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_RootOrder
|
|
||||||
value: 11
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: -0.61
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: -2.7
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
|
||||||
--- !u!1 &401600531
|
--- !u!1 &401600531
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -1576,6 +1577,64 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
|
--- !u!1 &479705986
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 479705987}
|
||||||
|
- component: {fileID: 479705989}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Right
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &479705987
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 479705986}
|
||||||
|
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: 1130879221}
|
||||||
|
m_RootOrder: 3
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!61 &479705989
|
||||||
|
BoxCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 479705986}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_UsedByComposite: 0
|
||||||
|
m_Offset: {x: 9.8, 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: 1, y: 12}
|
||||||
|
m_EdgeRadius: 0
|
||||||
--- !u!224 &481992233 stripped
|
--- !u!224 &481992233 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
|
|
@ -1594,7 +1653,7 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 13
|
value: 12
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
|
|
@ -1930,7 +1989,7 @@ MonoBehaviour:
|
||||||
m_HandleRect: {fileID: 2006577138}
|
m_HandleRect: {fileID: 2006577138}
|
||||||
m_Direction: 2
|
m_Direction: 2
|
||||||
m_Value: 1
|
m_Value: 1
|
||||||
m_Size: 0.5386615
|
m_Size: 0.5386614
|
||||||
m_NumberOfSteps: 0
|
m_NumberOfSteps: 0
|
||||||
m_OnValueChanged:
|
m_OnValueChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
|
|
@ -2130,7 +2189,8 @@ Transform:
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 1130879221}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
|
@ -3776,7 +3836,7 @@ MonoBehaviour:
|
||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 23.65
|
m_fontSize: 18
|
||||||
m_fontSizeBase: 40
|
m_fontSizeBase: 40
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 1
|
||||||
|
|
@ -4768,6 +4828,41 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
|
--- !u!1 &1130879220
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1130879221}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: EdgeColliders
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1130879221
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1130879220}
|
||||||
|
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: 1653417101}
|
||||||
|
- {fileID: 1960980872}
|
||||||
|
- {fileID: 67384321}
|
||||||
|
- {fileID: 479705987}
|
||||||
|
m_Father: {fileID: 598358739}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!224 &1135245126 stripped
|
--- !u!224 &1135245126 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
|
|
@ -7409,6 +7504,64 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1649897725}
|
m_GameObject: {fileID: 1649897725}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &1653417100
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1653417101}
|
||||||
|
- component: {fileID: 1653417103}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Top
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1653417101
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1653417100}
|
||||||
|
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: 1130879221}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!61 &1653417103
|
||||||
|
BoxCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1653417100}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_UsedByComposite: 0
|
||||||
|
m_Offset: {x: 0, y: 5.5}
|
||||||
|
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: 21, y: 1}
|
||||||
|
m_EdgeRadius: 0
|
||||||
--- !u!1 &1671356616
|
--- !u!1 &1671356616
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -8124,7 +8277,7 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 12
|
value: 11
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
|
|
@ -8273,6 +8426,63 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
|
--- !u!1001 &1889531549
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 2510115116361252817, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: Cow (3)
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 13
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: -0.61
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: -2.7
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2510115116361252819, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 547dbbf4c5377dc409dfea772c096434, type: 3}
|
||||||
--- !u!1 &1894722676
|
--- !u!1 &1894722676
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -8358,7 +8568,7 @@ MonoBehaviour:
|
||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 29.25
|
m_fontSize: 18
|
||||||
m_fontSizeBase: 20
|
m_fontSizeBase: 20
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 1
|
||||||
|
|
@ -8523,6 +8733,64 @@ RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 2069667813}
|
m_PrefabInstance: {fileID: 2069667813}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &1960980871
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1960980872}
|
||||||
|
- component: {fileID: 1960980874}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Bottom
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1960980872
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1960980871}
|
||||||
|
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: 1130879221}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!61 &1960980874
|
||||||
|
BoxCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1960980871}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_UsedByComposite: 0
|
||||||
|
m_Offset: {x: 0, y: -5.5}
|
||||||
|
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: 21, y: 1}
|
||||||
|
m_EdgeRadius: 0
|
||||||
--- !u!1001 &1976135827
|
--- !u!1001 &1976135827
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -9010,7 +9278,7 @@ MonoBehaviour:
|
||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 29.25
|
m_fontSize: 18
|
||||||
m_fontSizeBase: 20
|
m_fontSizeBase: 20
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 1
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,46 @@
|
||||||
using System;
|
|
||||||
using DefaultNamespace;
|
using DefaultNamespace;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
public class Animal : MonoBehaviour {
|
public class Animal : MonoBehaviour {
|
||||||
protected Sprite animalSprite;
|
|
||||||
private Item _producedItem;
|
private Item _producedItem;
|
||||||
private Rigidbody2D _rigidbody;
|
private Rigidbody2D _rigidbody;
|
||||||
|
|
||||||
public Item ProducedItem => _producedItem;
|
public Item ProducedItem => _producedItem;
|
||||||
|
|
||||||
|
public Sprite animalSprite;
|
||||||
|
public int movementSpeed;
|
||||||
|
|
||||||
private void Start() {
|
private void Start() {
|
||||||
_rigidbody = gameObject.GetComponent<Rigidbody2D>();
|
_rigidbody = gameObject.GetComponent<Rigidbody2D>();
|
||||||
animalSprite = gameObject.GetComponent<SpriteRenderer>().GetComponent<Sprite>();
|
animalSprite = gameObject.GetComponent<SpriteRenderer>().GetComponent<Sprite>();
|
||||||
|
|
||||||
_rigidbody.velocity = new Vector2(Random.Range(1, 10),
|
|
||||||
Random.Range(1, 10));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update() {
|
private void Update() {
|
||||||
_rigidbody.velocity = new Vector2(_rigidbody.velocity.x * Random.Range(0, 10),
|
_rigidbody.rotation = 0f;
|
||||||
_rigidbody.velocity.y * Random.Range(0, 10));// TODO: wer?
|
|
||||||
|
Vector2 direction = new Vector2(
|
||||||
|
Random.Range(-1f, 1f),
|
||||||
|
Random.Range(-1f, 1f));
|
||||||
|
direction.Normalize();
|
||||||
|
_rigidbody.velocity = movementSpeed * direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnCollisionEnter2D(Collision2D col) {
|
||||||
|
Vector2 oldPos = _rigidbody.position;
|
||||||
|
//TODO: collide with edges working but no stopping
|
||||||
|
string[] colNames = { "Top", "Bottom", "Left", "Right" };
|
||||||
|
foreach(string colName in colNames) {
|
||||||
|
if(colName.ToUpper().Equals(col.gameObject.name.ToUpper())) {
|
||||||
|
Debug.Log("EEEEEEEE " + col.gameObject.name);
|
||||||
|
_rigidbody.position = oldPos;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Animations
|
// TODO: Animations
|
||||||
|
|
||||||
private void OnMouseDown() {
|
private void OnMouseDown() {
|
||||||
ActionInvoker.InvokeAction(gameObject, PlayerController.instance.SelectedItem);
|
ActionInvoker.InvokeAction(gameObject, PlayerController.instance.SelectedItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -15,7 +15,7 @@ public class Item : ScriptableObject, IComparable<Item> {
|
||||||
public Item(string displayName, string description, int id) {
|
public Item(string displayName, string description, int id) {
|
||||||
this.displayName = displayName;
|
this.displayName = displayName;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
this._id = id;
|
_id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int CompareTo(Item other) {
|
public int CompareTo(Item other) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,12 +137,21 @@
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
|
"com.unity.nuget.newtonsoft-json": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"depth": 2,
|
||||||
|
"source": "registry",
|
||||||
|
"dependencies": {},
|
||||||
|
"url": "https://packages.unity.com"
|
||||||
|
},
|
||||||
"com.unity.services.core": {
|
"com.unity.services.core": {
|
||||||
"version": "1.0.1",
|
"version": "1.3.1",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.modules.unitywebrequest": "1.0.0"
|
"com.unity.modules.unitywebrequest": "1.0.0",
|
||||||
|
"com.unity.nuget.newtonsoft-json": "3.0.2",
|
||||||
|
"com.unity.modules.androidjni": "1.0.0"
|
||||||
},
|
},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue