mirror of
https://github.com/ConjureETS/DeathBook.git
synced 2026-03-26 05:20:58 +00:00
Merge branch 'master' of https://github.com/ConjureETS/DeathBook
Conflicts: Assets/Tests/Center.cs
This commit is contained in:
commit
36f638b4f8
@ -135,17 +135,17 @@ Camera:
|
|||||||
m_GameObject: {fileID: 61719360}
|
m_GameObject: {fileID: 61719360}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_ClearFlags: 1
|
m_ClearFlags: 2
|
||||||
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
|
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
|
||||||
m_NormalizedViewPortRect:
|
m_NormalizedViewPortRect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
width: 1
|
width: .800000012
|
||||||
height: 1
|
height: .800000012
|
||||||
near clip plane: .300000012
|
near clip plane: .300000012
|
||||||
far clip plane: 1000
|
far clip plane: 1000
|
||||||
field of view: 49
|
field of view: 59
|
||||||
orthographic: 0
|
orthographic: 0
|
||||||
orthographic size: 5
|
orthographic size: 5
|
||||||
m_Depth: -1
|
m_Depth: -1
|
||||||
@ -165,12 +165,134 @@ Transform:
|
|||||||
m_PrefabParentObject: {fileID: 0}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_PrefabInternal: {fileID: 0}
|
m_PrefabInternal: {fileID: 0}
|
||||||
m_GameObject: {fileID: 61719360}
|
m_GameObject: {fileID: 61719360}
|
||||||
m_LocalRotation: {x: -.259112954, y: .110958092, z: -.0299803261, w: -.958983839}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 2.95000005, y: 9.18000031, z: -15.3199997}
|
m_LocalPosition: {x: 0, y: 0, z: -15.1300001}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
|
--- !u!1 &523974148
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Component:
|
||||||
|
- 224: {fileID: 523974151}
|
||||||
|
- 222: {fileID: 523974150}
|
||||||
|
- 114: {fileID: 523974149}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: RightUI
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &523974149
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 523974148}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: .39199999}
|
||||||
|
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 1
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
--- !u!222 &523974150
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 523974148}
|
||||||
|
--- !u!224 &523974151
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 523974148}
|
||||||
|
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: 1057734538}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_AnchorMin: {x: .800000012, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: .800000012}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: .5, y: .5}
|
||||||
|
--- !u!1 &534364716
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Component:
|
||||||
|
- 224: {fileID: 534364717}
|
||||||
|
- 222: {fileID: 534364719}
|
||||||
|
- 114: {fileID: 534364718}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: TopUI
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &534364717
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 534364716}
|
||||||
|
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: 1057734538}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_AnchorMin: {x: 0, y: .800000012}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: .5, y: .5}
|
||||||
|
--- !u!114 &534364718
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 534364716}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: .39199999}
|
||||||
|
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 1
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
--- !u!222 &534364719
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 534364716}
|
||||||
--- !u!1 &736567784
|
--- !u!1 &736567784
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -180,7 +302,6 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- 4: {fileID: 736567788}
|
- 4: {fileID: 736567788}
|
||||||
- 33: {fileID: 736567787}
|
- 33: {fileID: 736567787}
|
||||||
- 135: {fileID: 736567786}
|
|
||||||
- 23: {fileID: 736567785}
|
- 23: {fileID: 736567785}
|
||||||
- 114: {fileID: 736567789}
|
- 114: {fileID: 736567789}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
@ -196,7 +317,7 @@ MeshRenderer:
|
|||||||
m_PrefabParentObject: {fileID: 0}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_PrefabInternal: {fileID: 0}
|
m_PrefabInternal: {fileID: 0}
|
||||||
m_GameObject: {fileID: 736567784}
|
m_GameObject: {fileID: 736567784}
|
||||||
m_Enabled: 1
|
m_Enabled: 0
|
||||||
m_CastShadows: 1
|
m_CastShadows: 1
|
||||||
m_ReceiveShadows: 1
|
m_ReceiveShadows: 1
|
||||||
m_Materials:
|
m_Materials:
|
||||||
@ -214,18 +335,6 @@ MeshRenderer:
|
|||||||
m_LightmapParameters: {fileID: 0}
|
m_LightmapParameters: {fileID: 0}
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 0
|
||||||
--- !u!135 &736567786
|
|
||||||
SphereCollider:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 736567784}
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IsTrigger: 0
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Radius: .5
|
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!33 &736567787
|
--- !u!33 &736567787
|
||||||
MeshFilter:
|
MeshFilter:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -240,7 +349,7 @@ Transform:
|
|||||||
m_PrefabInternal: {fileID: 0}
|
m_PrefabInternal: {fileID: 0}
|
||||||
m_GameObject: {fileID: 736567784}
|
m_GameObject: {fileID: 736567784}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 5.96046448e-08, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
@ -257,10 +366,101 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
Link: {fileID: 11495142, guid: fab430cecad80ad4391987a06b550cb7, type: 2}
|
Link: {fileID: 11495142, guid: fab430cecad80ad4391987a06b550cb7, type: 2}
|
||||||
SpherePrototype: {fileID: 140654, guid: 646dd6566f9e1374caa3af8ad37c43d3, type: 2}
|
Person: {fileID: 11406500, guid: 646dd6566f9e1374caa3af8ad37c43d3, type: 2}
|
||||||
PointsAmount: 400
|
PointsAmount: 400
|
||||||
SphereRadius: 7
|
SphereRadius: 7
|
||||||
rotationSpeed: .699999988
|
rotationSpeed: .699999988
|
||||||
|
--- !u!1 &1057734534
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Component:
|
||||||
|
- 224: {fileID: 1057734538}
|
||||||
|
- 223: {fileID: 1057734537}
|
||||||
|
- 114: {fileID: 1057734536}
|
||||||
|
- 114: {fileID: 1057734535}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Canvas
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1057734535
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1057734534}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
--- !u!114 &1057734536
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1057734534}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_UiScaleMode: 0
|
||||||
|
m_ReferencePixelsPerUnit: 100
|
||||||
|
m_ScaleFactor: 1
|
||||||
|
m_ReferenceResolution: {x: 800, y: 600}
|
||||||
|
m_ScreenMatchMode: 0
|
||||||
|
m_MatchWidthOrHeight: 0
|
||||||
|
m_PhysicalUnit: 3
|
||||||
|
m_FallbackScreenDPI: 96
|
||||||
|
m_DefaultSpriteDPI: 96
|
||||||
|
m_DynamicPixelsPerUnit: 1
|
||||||
|
--- !u!223 &1057734537
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1057734534}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_RenderMode: 0
|
||||||
|
m_Camera: {fileID: 0}
|
||||||
|
m_PlaneDistance: 100
|
||||||
|
m_PixelPerfect: 0
|
||||||
|
m_ReceivesEvents: 1
|
||||||
|
m_OverrideSorting: 0
|
||||||
|
m_OverridePixelPerfect: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
--- !u!224 &1057734538
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1057734534}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 534364717}
|
||||||
|
- {fileID: 523974151}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 3
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0, y: 0}
|
||||||
--- !u!1 &1126063559
|
--- !u!1 &1126063559
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -321,3 +521,76 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
|
--- !u!1 &1999982083
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Component:
|
||||||
|
- 4: {fileID: 1999982087}
|
||||||
|
- 114: {fileID: 1999982086}
|
||||||
|
- 114: {fileID: 1999982085}
|
||||||
|
- 114: {fileID: 1999982084}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: EventSystem
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1999982084
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1999982083}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_AllowActivationOnStandalone: 0
|
||||||
|
--- !u!114 &1999982085
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1999982083}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_HorizontalAxis: Horizontal
|
||||||
|
m_VerticalAxis: Vertical
|
||||||
|
m_SubmitButton: Submit
|
||||||
|
m_CancelButton: Cancel
|
||||||
|
m_InputActionsPerSecond: 10
|
||||||
|
m_AllowActivationOnMobileDevice: 0
|
||||||
|
--- !u!114 &1999982086
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1999982083}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_FirstSelected: {fileID: 0}
|
||||||
|
m_sendNavigationEvents: 1
|
||||||
|
m_DragThreshold: 5
|
||||||
|
--- !u!4 &1999982087
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1999982083}
|
||||||
|
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: 0}
|
||||||
|
m_RootOrder: 4
|
||||||
@ -1,8 +1,11 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
|
[RequireComponent(typeof(LineRenderer))]
|
||||||
public class FriendshipLink : MonoBehaviour
|
public class FriendshipLink : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
public Color HighlightedColor = new Color(1f, 1f, 1f, 0.5f);
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private Transform StartPoint;
|
private Transform StartPoint;
|
||||||
|
|
||||||
@ -21,13 +24,19 @@ public class FriendshipLink : MonoBehaviour
|
|||||||
|
|
||||||
private float LIFETIME_RATIO = 0.025f;
|
private float LIFETIME_RATIO = 0.025f;
|
||||||
|
|
||||||
|
private Renderer _renderer;
|
||||||
|
private Color _defaultColor;
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
|
// Set the importance (weight) of the link here
|
||||||
BeamLine.SetWidth(0.2f, 0.2f);
|
BeamLine.SetWidth(0.2f, 0.2f);
|
||||||
|
|
||||||
Renderer lineRenderer = BeamLine.GetComponent<Renderer>();
|
_renderer = BeamLine.GetComponent<Renderer>();
|
||||||
|
|
||||||
lineRenderer.material = Instantiate(lineRenderer.material);
|
_renderer.material = Instantiate(_renderer.material);
|
||||||
|
|
||||||
|
_defaultColor = _renderer.material.GetColor("_TintColor");
|
||||||
|
|
||||||
//Activate(false);
|
//Activate(false);
|
||||||
}
|
}
|
||||||
@ -69,4 +78,11 @@ public class FriendshipLink : MonoBehaviour
|
|||||||
StartObject = origin.transform;
|
StartObject = origin.transform;
|
||||||
EndObject = destination.transform;
|
EndObject = destination.transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Highlight(bool state, float weight)
|
||||||
|
{
|
||||||
|
// For now, the weight does nothing but it should eventually influence the intensity and size of the link
|
||||||
|
|
||||||
|
_renderer.material.SetColor("_TintColor", state ? HighlightedColor : _defaultColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -154,6 +154,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: c495d00d780bd3d49866ec60f5efbf66, type: 3}
|
m_Script: {fileID: 11500000, guid: c495d00d780bd3d49866ec60f5efbf66, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
HighlightedColor: {r: 1, g: 1, b: 1, a: .501960814}
|
||||||
StartPoint: {fileID: 495136}
|
StartPoint: {fileID: 495136}
|
||||||
EndPoint: {fileID: 495134}
|
EndPoint: {fileID: 495134}
|
||||||
BeamLine: {fileID: 12095142}
|
BeamLine: {fileID: 12095142}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ Material:
|
|||||||
name: _MainTex
|
name: _MainTex
|
||||||
second:
|
second:
|
||||||
m_Texture: {fileID: 2800000, guid: dce27f2c9adab1144824c9b2040f18d5, type: 3}
|
m_Texture: {fileID: 2800000, guid: dce27f2c9adab1144824c9b2040f18d5, type: 3}
|
||||||
m_Scale: {x: 24.6399994, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
data:
|
data:
|
||||||
first:
|
first:
|
||||||
|
|||||||
@ -1,86 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &106018
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
|
||||||
serializedVersion: 4
|
|
||||||
m_Component:
|
|
||||||
- 4: {fileID: 456258}
|
|
||||||
- 33: {fileID: 3369818}
|
|
||||||
- 64: {fileID: 6498216}
|
|
||||||
- 23: {fileID: 2339886}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Person
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &456258
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
|
||||||
m_GameObject: {fileID: 106018}
|
|
||||||
m_LocalRotation: {x: .70710659, y: 0, z: 0, w: -.707106948}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: .100000001, y: .100000001, z: .100000001}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 0
|
|
||||||
--- !u!23 &2339886
|
|
||||||
MeshRenderer:
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
|
||||||
m_GameObject: {fileID: 106018}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_CastShadows: 1
|
|
||||||
m_ReceiveShadows: 1
|
|
||||||
m_Materials:
|
|
||||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
|
||||||
m_SubsetIndices:
|
|
||||||
m_StaticBatchRoot: {fileID: 0}
|
|
||||||
m_UseLightProbes: 1
|
|
||||||
m_ReflectionProbeUsage: 1
|
|
||||||
m_ProbeAnchor: {fileID: 0}
|
|
||||||
m_ScaleInLightmap: 1
|
|
||||||
m_PreserveUVs: 1
|
|
||||||
m_ImportantGI: 0
|
|
||||||
m_AutoUVMaxDistance: .5
|
|
||||||
m_AutoUVMaxAngle: 89
|
|
||||||
m_LightmapParameters: {fileID: 0}
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingOrder: 0
|
|
||||||
--- !u!33 &3369818
|
|
||||||
MeshFilter:
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
|
||||||
m_GameObject: {fileID: 106018}
|
|
||||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
|
||||||
--- !u!64 &6498216
|
|
||||||
MeshCollider:
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 100100000}
|
|
||||||
m_GameObject: {fileID: 106018}
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IsTrigger: 0
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Convex: 0
|
|
||||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
|
||||||
--- !u!1001 &100100000
|
|
||||||
Prefab:
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
m_TransformParent: {fileID: 0}
|
|
||||||
m_Modifications: []
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_ParentPrefab: {fileID: 0}
|
|
||||||
m_RootGameObject: {fileID: 106018}
|
|
||||||
m_IsPrefabParent: 1
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c5b66487a8909dc42a46e73c0b340df0
|
|
||||||
timeCreated: 1439311712
|
|
||||||
licenseType: Free
|
|
||||||
NativeFormatImporter:
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 13 KiB |
@ -1,10 +1,11 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
public class Sphere : MonoBehaviour
|
public class Center : MonoBehaviour
|
||||||
{
|
{
|
||||||
public FriendshipLink Link;
|
public FriendshipLink Link;
|
||||||
public GameObject SpherePrototype;
|
public PersonTest Person;
|
||||||
public int PointsAmount = 50;
|
public int PointsAmount = 50;
|
||||||
public float SphereRadius = 1f;
|
public float SphereRadius = 1f;
|
||||||
public float rotationSpeed = 0.7f;
|
public float rotationSpeed = 0.7f;
|
||||||
@ -13,6 +14,8 @@ public class Sphere : MonoBehaviour
|
|||||||
private bool dragging = false;
|
private bool dragging = false;
|
||||||
private Vector3 delta = new Vector3();
|
private Vector3 delta = new Vector3();
|
||||||
private Rigidbody rb;
|
private Rigidbody rb;
|
||||||
|
private PersonTest[] people;
|
||||||
|
|
||||||
|
|
||||||
private GameObject[] nodes;
|
private GameObject[] nodes;
|
||||||
|
|
||||||
@ -25,7 +28,18 @@ public class Sphere : MonoBehaviour
|
|||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
transform.Rotate(Vector3.one * Time.deltaTime * rotationSpeed);
|
Vector3 screenMousePos = Input.mousePosition;
|
||||||
|
|
||||||
|
screenMousePos.z = transform.position.z - Camera.main.transform.position.z;
|
||||||
|
|
||||||
|
Vector3 worldMousePos = Camera.main.ScreenToWorldPoint(screenMousePos);
|
||||||
|
|
||||||
|
// If the world position of the mouse is greater than the radius of the sphere, we are outside
|
||||||
|
if (Mathf.Sqrt(worldMousePos.x * worldMousePos.x + worldMousePos.y * worldMousePos.y) > SphereRadius + 1f)
|
||||||
|
{
|
||||||
|
transform.Rotate(Vector3.one * Time.deltaTime * rotationSpeed);
|
||||||
|
}
|
||||||
|
|
||||||
//when right btn clicked, call the chnge rotation
|
//when right btn clicked, call the chnge rotation
|
||||||
if (Input.GetMouseButtonDown(1))
|
if (Input.GetMouseButtonDown(1))
|
||||||
{
|
{
|
||||||
@ -36,10 +50,11 @@ public class Sphere : MonoBehaviour
|
|||||||
dragging = false;
|
dragging = false;
|
||||||
delta = new Vector3();
|
delta = new Vector3();
|
||||||
}
|
}
|
||||||
if (dragging) {
|
|
||||||
|
if (dragging)
|
||||||
|
{
|
||||||
MoveSphere();
|
MoveSphere();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveSphere()
|
void MoveSphere()
|
||||||
@ -70,7 +85,7 @@ public class Sphere : MonoBehaviour
|
|||||||
* dont end up drawing clusters of points and the spirals are way
|
* dont end up drawing clusters of points and the spirals are way
|
||||||
* less visible.
|
* less visible.
|
||||||
*/
|
*/
|
||||||
nodes = new GameObject[PointsAmount];
|
people = new PersonTest[PointsAmount];
|
||||||
|
|
||||||
float goldenAngle = Mathf.PI * (3 - Mathf.Sqrt(5));
|
float goldenAngle = Mathf.PI * (3 - Mathf.Sqrt(5));
|
||||||
|
|
||||||
@ -85,11 +100,11 @@ public class Sphere : MonoBehaviour
|
|||||||
float x = Mathf.Sin(longitude) * r;
|
float x = Mathf.Sin(longitude) * r;
|
||||||
float y = Mathf.Cos(longitude) * r;
|
float y = Mathf.Cos(longitude) * r;
|
||||||
|
|
||||||
GameObject simon = Instantiate(SpherePrototype, new Vector3(x, y, z), Quaternion.identity) as GameObject;
|
PersonTest simon = Instantiate(Person, new Vector3(x, y, z), Quaternion.identity) as PersonTest;
|
||||||
|
|
||||||
simon.transform.parent = this.transform;
|
simon.transform.parent = this.transform;
|
||||||
|
|
||||||
nodes[i] = simon;
|
people[i] = simon;
|
||||||
|
|
||||||
z -= zDistance;
|
z -= zDistance;
|
||||||
longitude += goldenAngle;
|
longitude += goldenAngle;
|
||||||
@ -98,13 +113,17 @@ public class Sphere : MonoBehaviour
|
|||||||
|
|
||||||
private void AssignLinks()
|
private void AssignLinks()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < nodes.Length / 4; i++)
|
for (int i = 0; i < people.Length / 4; i++)
|
||||||
{
|
{
|
||||||
FriendshipLink link = Instantiate(Link) as FriendshipLink;
|
FriendshipLink link = Instantiate(Link) as FriendshipLink;
|
||||||
|
|
||||||
int destinationIndex = Random.Range(nodes.Length / 2, nodes.Length - 1);
|
int destinationIndex = Random.Range(people.Length / 2, people.Length - 1);
|
||||||
|
|
||||||
link.AttachToObjects(nodes[i], nodes[destinationIndex]);
|
link.AttachToObjects(people[i].gameObject, people[destinationIndex].gameObject);
|
||||||
|
|
||||||
|
// Temporary stuff, for testing
|
||||||
|
people[i].AddLink(link);
|
||||||
|
people[destinationIndex].AddLink(link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
44
Assets/Tests/PersonTest.cs
Normal file
44
Assets/Tests/PersonTest.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
[RequireComponent(typeof(Collider))]
|
||||||
|
public class PersonTest : MonoBehaviour
|
||||||
|
{
|
||||||
|
// Temporary, for test
|
||||||
|
private List<FriendshipLink> _links;
|
||||||
|
private bool _highlighted = false;
|
||||||
|
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
_links = new List<FriendshipLink>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddLink(FriendshipLink link)
|
||||||
|
{
|
||||||
|
_links.Add(link);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnMouseOver()
|
||||||
|
{
|
||||||
|
if (!_highlighted)
|
||||||
|
{
|
||||||
|
_highlighted = true;
|
||||||
|
|
||||||
|
foreach (FriendshipLink link in _links)
|
||||||
|
{
|
||||||
|
link.Highlight(true, 1f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnMouseExit()
|
||||||
|
{
|
||||||
|
_highlighted = false;
|
||||||
|
|
||||||
|
foreach (FriendshipLink link in _links)
|
||||||
|
{
|
||||||
|
link.Highlight(false, 1f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
12
Assets/Tests/PersonTest.cs.meta
Normal file
12
Assets/Tests/PersonTest.cs.meta
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 91655186257590a4297df8939c1a2256
|
||||||
|
timeCreated: 1439395841
|
||||||
|
licenseType: Free
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -11,8 +11,9 @@ GameObject:
|
|||||||
- 33: {fileID: 3385696}
|
- 33: {fileID: 3385696}
|
||||||
- 135: {fileID: 13525706}
|
- 135: {fileID: 13525706}
|
||||||
- 23: {fileID: 2372112}
|
- 23: {fileID: 2372112}
|
||||||
|
- 114: {fileID: 11406500}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Sphere
|
m_Name: PersonTest
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -61,6 +62,17 @@ MeshFilter:
|
|||||||
m_PrefabInternal: {fileID: 100100000}
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
m_GameObject: {fileID: 140654}
|
m_GameObject: {fileID: 140654}
|
||||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!114 &11406500
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 140654}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 91655186257590a4297df8939c1a2256, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!135 &13525706
|
--- !u!135 &13525706
|
||||||
SphereCollider:
|
SphereCollider:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
@ -4,4 +4,6 @@
|
|||||||
EditorBuildSettings:
|
EditorBuildSettings:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Scenes: []
|
m_Scenes:
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/Gameplay.unity
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user