mirror of
https://github.com/ConjureETS/DeathBook.git
synced 2026-03-24 04:20:58 +00:00
Merge branch 'master' of https://github.com/ConjureETS/DeathBook
Conflicts: Assets/Scenes/UiTweaking.unity
This commit is contained in:
commit
e11989f2c3
@ -88,12 +88,14 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d0907c1567bad554c8b995de3459e517, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
LinkObj: {fileID: 11495142, guid: fab430cecad80ad4391987a06b550cb7, type: 2}
|
||||
PersonObj: {fileID: 11417564, guid: 7a5b1db47a2c30e419038df40dffa79a, type: 2}
|
||||
NumPeople: 50
|
||||
AvgNumFriends: 8
|
||||
FriendshipLikeliness: .400000006
|
||||
SphereRadius: 7
|
||||
gameObjects:
|
||||
LinkObj: {fileID: 11495142, guid: fab430cecad80ad4391987a06b550cb7, type: 2}
|
||||
PersonObj: {fileID: 11417564, guid: 7a5b1db47a2c30e419038df40dffa79a, type: 2}
|
||||
levelOptions:
|
||||
NumPeople: 50
|
||||
AvgNumFriends: 8
|
||||
FriendshipLikeliness: .600000024
|
||||
SphereRadius: 7
|
||||
rotationSpeed: .699999988
|
||||
torqueForce: 1
|
||||
DetailsPanel: {fileID: 0}
|
||||
|
||||
@ -395,7 +395,19 @@ MonoBehaviour:
|
||||
m_TargetGraphic: {fileID: 11443318}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 11476684}
|
||||
m_MethodName: KillNode
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
--- !u!114 &11411578
|
||||
@ -457,8 +469,8 @@ MonoBehaviour:
|
||||
m_TargetGraphic: {fileID: 11431992}
|
||||
m_HandleRect: {fileID: 22417254}
|
||||
m_Direction: 2
|
||||
m_Value: 1
|
||||
m_Size: .427392095
|
||||
m_Value: .999378026
|
||||
m_Size: .427392036
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
@ -645,7 +657,7 @@ MonoBehaviour:
|
||||
WatchButton: {fileID: 11491412}
|
||||
XButton: {fileID: 11494666}
|
||||
Container: {fileID: 147852}
|
||||
UIFriendPicture: {fileID: 11467422, guid: 16a1d168f1ef75b4690435675a9e69b0, type: 2}
|
||||
FriendPicture: {fileID: 11469406, guid: 16a1d168f1ef75b4690435675a9e69b0, type: 2}
|
||||
--- !u!114 &11478962
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@ -1093,7 +1105,7 @@ RectTransform:
|
||||
m_RootOrder: 0
|
||||
m_AnchorMin: {x: .5, y: 1}
|
||||
m_AnchorMax: {x: .5, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -65.9999924}
|
||||
m_AnchoredPosition: {x: 0, y: -65.95298}
|
||||
m_SizeDelta: {x: 90, y: 132}
|
||||
m_Pivot: {x: .5, y: .5}
|
||||
--- !u!224 &22462244
|
||||
|
||||
@ -62,7 +62,7 @@ Transform:
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 193868}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalPosition: {x: -544.163269, y: -235.973114, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 496448}
|
||||
@ -75,7 +75,7 @@ Transform:
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 136744}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -.00100000005}
|
||||
m_LocalScale: {x: .800000012, y: .800000012, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 498100}
|
||||
|
||||
@ -10,6 +10,8 @@ GameObject:
|
||||
- 224: {fileID: 22403202}
|
||||
- 222: {fileID: 22221002}
|
||||
- 114: {fileID: 11467422}
|
||||
- 114: {fileID: 11469406}
|
||||
- 114: {fileID: 11492734}
|
||||
m_Layer: 5
|
||||
m_Name: UIFriendPicture
|
||||
m_TagString: Untagged
|
||||
@ -38,6 +40,47 @@ MonoBehaviour:
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &11469406
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 115844}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 343d57f2bac42ae48ba9722c53e5526f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &11492734
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 115844}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -1862395651, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
delegates:
|
||||
- eventID: 4
|
||||
callback:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 11469406}
|
||||
m_MethodName: OnClick
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
--- !u!222 &22221002
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
|
||||
138
Assets/Resources/Materials/skullLogo.mat
Normal file
138
Assets/Resources/Materials/skullLogo.mat
Normal file
@ -0,0 +1,138 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: skullLogo
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 25ff200345c91d641a8f4edfe64cdc95, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _BumpMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailNormalMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _ParallaxMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _OcclusionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _EmissionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailMask
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailAlbedoMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _MetallicGlossMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _SrcBlend
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _DstBlend
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Cutoff
|
||||
second: .5
|
||||
data:
|
||||
first:
|
||||
name: _Parallax
|
||||
second: .0199999996
|
||||
data:
|
||||
first:
|
||||
name: _ZWrite
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _Glossiness
|
||||
second: .5
|
||||
data:
|
||||
first:
|
||||
name: _BumpScale
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _OcclusionStrength
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _DetailNormalMapScale
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _UVSec
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Mode
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Metallic
|
||||
second: 0
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _EmissionColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
8
Assets/Resources/Materials/skullLogo.mat.meta
Normal file
8
Assets/Resources/Materials/skullLogo.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17f2c3e8895cc004db164dd0f8963cd2
|
||||
timeCreated: 1439707135
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
138
Assets/Resources/Materials/splash.mat
Normal file
138
Assets/Resources/Materials/splash.mat
Normal file
@ -0,0 +1,138 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: splash
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: a36d12e06ea9bd446b8aa07497d246dd, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _BumpMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailNormalMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _ParallaxMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _OcclusionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _EmissionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailMask
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailAlbedoMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _MetallicGlossMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _SrcBlend
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _DstBlend
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Cutoff
|
||||
second: .5
|
||||
data:
|
||||
first:
|
||||
name: _Parallax
|
||||
second: .0199999996
|
||||
data:
|
||||
first:
|
||||
name: _ZWrite
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _Glossiness
|
||||
second: .5
|
||||
data:
|
||||
first:
|
||||
name: _BumpScale
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _OcclusionStrength
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _DetailNormalMapScale
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _UVSec
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Mode
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Metallic
|
||||
second: 0
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _EmissionColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
8
Assets/Resources/Materials/splash.mat.meta
Normal file
8
Assets/Resources/Materials/splash.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 30af58f30cfd7f143a3f5748b216fe5b
|
||||
timeCreated: 1439708198
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -30,22 +30,22 @@ TextureImporter:
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
aniso: 16
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
alphaIsTransparency: 1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
|
||||
BIN
Assets/Resources/slaughterLogo.png
Normal file
BIN
Assets/Resources/slaughterLogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
55
Assets/Resources/slaughterLogo.png.meta
Normal file
55
Assets/Resources/slaughterLogo.png.meta
Normal file
@ -0,0 +1,55 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eaaa90877e079004eb38be08a3e86db7
|
||||
timeCreated: 1439706021
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Resources/splash.png
Normal file
BIN
Assets/Resources/splash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
55
Assets/Resources/splash.png.meta
Normal file
55
Assets/Resources/splash.png.meta
Normal file
@ -0,0 +1,55 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a36d12e06ea9bd446b8aa07497d246dd
|
||||
timeCreated: 1439707873
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@ -136,7 +136,7 @@ Camera:
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: .117647059, g: .176470593, b: .286274523, a: 1}
|
||||
m_BackGroundColor: {r: .847058833, g: .874509811, b: .917647064, a: 1}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
@ -218,7 +218,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: .117647059, g: .176470593, b: .286274523, a: 1}
|
||||
m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1}
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
@ -413,7 +413,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: .215686277, g: .325490206, b: .541176498, a: 1}
|
||||
m_Color: {r: .23137255, g: .349019617, b: .596078455, a: 1}
|
||||
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
@ -733,23 +733,19 @@ Prefab:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22417254, guid: c993e87661906234fba410e55ed66832, type: 2}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: .415405631
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22417254, guid: c993e87661906234fba410e55ed66832, type: 2}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22417254, guid: c993e87661906234fba410e55ed66832, type: 2}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: .999999881
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 11414010, guid: c993e87661906234fba410e55ed66832, type: 2}
|
||||
propertyPath: m_Value
|
||||
value: .999999702
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 11414010, guid: c993e87661906234fba410e55ed66832, type: 2}
|
||||
propertyPath: m_Size
|
||||
value: .58459425
|
||||
- target: {fileID: 22458514, guid: c993e87661906234fba410e55ed66832, type: 2}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -65.965889
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: c993e87661906234fba410e55ed66832, type: 2}
|
||||
@ -1078,14 +1074,6 @@ Prefab:
|
||||
propertyPath: levelOptions.SphereRadius
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 11432906, guid: 136ea38d5deb4c9418beb879167d9b03, type: 2}
|
||||
propertyPath: levelOptions.FriendshipLikeliness
|
||||
value: .600000024
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 11432906, guid: 136ea38d5deb4c9418beb879167d9b03, type: 2}
|
||||
propertyPath: levelOptions.AvgNumFriends
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 136ea38d5deb4c9418beb879167d9b03, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
|
||||
532
Assets/Scenes/splash.unity
Normal file
532
Assets/Scenes/splash.unity
Normal file
@ -0,0 +1,532 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
SceneSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PVSData:
|
||||
m_PVSObjectsArray: []
|
||||
m_PVSPortalsArray: []
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: .25
|
||||
backfaceThreshold: 100
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 6
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: .00999999978
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
|
||||
m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
|
||||
m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: .5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
--- !u!127 &3
|
||||
LevelGameManager:
|
||||
m_ObjectHideFlags: 0
|
||||
--- !u!157 &4
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 5
|
||||
m_GIWorkflowMode: 0
|
||||
m_LightmapsMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 3
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_TextureWidth: 1024
|
||||
m_TextureHeight: 1024
|
||||
m_AOMaxDistance: 1
|
||||
m_Padding: 2
|
||||
m_CompAOExponent: 0
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherRayCount: 1024
|
||||
m_LightmapSnapshot: {fileID: 0}
|
||||
m_RuntimeCPUUsage: 25
|
||||
--- !u!196 &5
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentRadius: .5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: .400000006
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
accuratePlacement: 0
|
||||
minRegionArea: 2
|
||||
cellSize: .166666672
|
||||
manualCellSize: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &12356507
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 12356509}
|
||||
- 108: {fileID: 12356508}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &12356508
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 12356507}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 6
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: .956862748, b: .839215696, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: .0500000007
|
||||
m_NormalBias: .400000006
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 4
|
||||
m_BounceIntensity: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
--- !u!4 &12356509
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 12356507}
|
||||
m_LocalRotation: {x: .408217937, y: -.234569728, z: .109381676, w: .875426054}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
--- !u!1 &608195445
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 608195450}
|
||||
- 20: {fileID: 608195449}
|
||||
- 92: {fileID: 608195448}
|
||||
- 124: {fileID: 608195447}
|
||||
- 81: {fileID: 608195446}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &608195446
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 608195445}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &608195447
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 608195445}
|
||||
m_Enabled: 1
|
||||
--- !u!92 &608195448
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 608195445}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &608195449
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 608195445}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: .300000012
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_HDR: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: .0219999999
|
||||
m_StereoMirrorMode: 0
|
||||
--- !u!4 &608195450
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 608195445}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -2}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
--- !u!1 &613726785
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 613726789}
|
||||
- 114: {fileID: 613726788}
|
||||
- 114: {fileID: 613726787}
|
||||
- 114: {fileID: 613726786}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &613726786
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 613726785}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_AllowActivationOnStandalone: 0
|
||||
--- !u!114 &613726787
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 613726785}
|
||||
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_RepeatDelay: .5
|
||||
m_AllowActivationOnMobileDevice: 0
|
||||
--- !u!114 &613726788
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 613726785}
|
||||
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 &613726789
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 613726785}
|
||||
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: 3
|
||||
--- !u!1 &805318196
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 224: {fileID: 805318197}
|
||||
- 222: {fileID: 805318199}
|
||||
- 114: {fileID: 805318198}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &805318197
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 805318196}
|
||||
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: 2125224430}
|
||||
m_RootOrder: 0
|
||||
m_AnchorMin: {x: .5, y: .5}
|
||||
m_AnchorMax: {x: .5, y: .5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: .5, y: .5}
|
||||
--- !u!114 &805318198
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 805318196}
|
||||
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: 1}
|
||||
m_Sprite: {fileID: 21300000, guid: 0c813218655d0a1468d7269b69deb9d5, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!222 &805318199
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 805318196}
|
||||
--- !u!1 &1671688409
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 1671688410}
|
||||
- 33: {fileID: 1671688413}
|
||||
- 64: {fileID: 1671688412}
|
||||
- 23: {fileID: 1671688411}
|
||||
m_Layer: 0
|
||||
m_Name: Quad
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &1671688410
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1671688409}
|
||||
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: 0
|
||||
--- !u!23 &1671688411
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1671688409}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 17f2c3e8895cc004db164dd0f8963cd2, type: 2}
|
||||
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!64 &1671688412
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1671688409}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Convex: 0
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!33 &1671688413
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1671688409}
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &2125224426
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 224: {fileID: 2125224430}
|
||||
- 223: {fileID: 2125224429}
|
||||
- 114: {fileID: 2125224428}
|
||||
- 114: {fileID: 2125224427}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2125224427
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2125224426}
|
||||
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 &2125224428
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2125224426}
|
||||
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 &2125224429
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2125224426}
|
||||
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 &2125224430
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2125224426}
|
||||
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: 805318197}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
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}
|
||||
8
Assets/Scenes/splash.unity.meta
Normal file
8
Assets/Scenes/splash.unity.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 551926e94351f4248a01898e8c79c890
|
||||
timeCreated: 1439706445
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -9,8 +9,10 @@ public class Link : MonoBehaviour, IObserver
|
||||
private float highlightAlpha = 0.8f;
|
||||
private float defaultAlpha = 0.5f;
|
||||
|
||||
private Color currentDefaultColor;
|
||||
private Color currentHighlightColor;
|
||||
private Color color;
|
||||
|
||||
private Color baseColor = new Color(0.3f, 0.7f, 1f);
|
||||
private Color inactiveColor = new Color(0.15f, 0.15f, 0.05f);
|
||||
|
||||
private static float defaultScale = 0.03f;
|
||||
private float hightlightScale = 0.2f;
|
||||
@ -40,7 +42,7 @@ public class Link : MonoBehaviour, IObserver
|
||||
model.Subscribe(this);
|
||||
|
||||
//Make it between 0.1 and 0.4
|
||||
GetColors(Model.Awareness);
|
||||
GetColors();
|
||||
hightlightScale = Model.Importance * 0.3f + 0.1f;
|
||||
Highlight(false);
|
||||
}
|
||||
@ -66,8 +68,10 @@ public class Link : MonoBehaviour, IObserver
|
||||
|
||||
public void Notify()
|
||||
{
|
||||
GetColors(Model.Awareness);
|
||||
GetColors();
|
||||
UpdateBeam();
|
||||
if (Model.KillCount == 2)
|
||||
hightlightScale = 0.1f;
|
||||
//TODO SR
|
||||
}
|
||||
|
||||
@ -115,29 +119,23 @@ public class Link : MonoBehaviour, IObserver
|
||||
UpdateBeam();
|
||||
}
|
||||
|
||||
private void GetColors(float level)
|
||||
private void GetColors()
|
||||
{
|
||||
//If level is 0.0, green [0,1,0].
|
||||
//If level is 0.5, yellow [1,1,0].
|
||||
//If level is 1.0, red [1,0,0].
|
||||
|
||||
float r = 1f;
|
||||
float g = 1f;
|
||||
|
||||
if (level < 0.5f)
|
||||
r = Mathf.Lerp(0, 1, level*2);
|
||||
if (Model.KillCount == 0)
|
||||
color = baseColor;
|
||||
else if (Model.KillCount == 2)
|
||||
color = inactiveColor;
|
||||
else
|
||||
g = Mathf.Lerp(1, 0, level * 2 - 1);
|
||||
|
||||
currentDefaultColor = new Color(r, g, 0f, defaultAlpha);
|
||||
currentHighlightColor = new Color(r, g, 0f, highlightAlpha);
|
||||
color = new Color(1f, Mathf.Lerp(1, 0, Model.Awareness), 0f);
|
||||
}
|
||||
|
||||
private void UpdateBeam()
|
||||
{
|
||||
float width = isHighlighted ? hightlightScale : defaultScale;
|
||||
BeamLine.SetWidth(width, width);
|
||||
|
||||
color.a = isHighlighted ? highlightAlpha : defaultAlpha;
|
||||
|
||||
_renderer.material.SetColor("_TintColor", isHighlighted ? currentHighlightColor : currentDefaultColor);
|
||||
_renderer.material.SetColor("_TintColor", color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,6 +27,12 @@ namespace DeathBook.Model
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
public void NotifyFriendWasKilled()
|
||||
{
|
||||
Link.KillCount++;
|
||||
Self.NotifyFriendWasKilled(this);
|
||||
}
|
||||
|
||||
public void Update(float deltaTime)
|
||||
{
|
||||
if (noticedDeath)
|
||||
|
||||
@ -20,6 +20,13 @@ namespace DeathBook.Model
|
||||
set { awareness = value; NotifyObservers(); }
|
||||
}
|
||||
|
||||
private int killCount = 0; //Number of people dead in this relationship
|
||||
public int KillCount
|
||||
{
|
||||
get { return killCount; }
|
||||
set { killCount = value; NotifyObservers(); }
|
||||
}
|
||||
|
||||
public FriendshipLink(Person p1, Person p2, float importance)
|
||||
{
|
||||
friend1 = p1;
|
||||
|
||||
@ -6,7 +6,7 @@ namespace DeathBook.Model
|
||||
{
|
||||
public class Level : Observable, Updatable
|
||||
{
|
||||
private const float TimeScale = 30f;
|
||||
private const float TimeScale = 30*4f;
|
||||
|
||||
private int score;
|
||||
public int Score { get { return score; } }
|
||||
@ -17,8 +17,12 @@ namespace DeathBook.Model
|
||||
public List<FriendshipLink> Friendships { get { return friendships; } }
|
||||
|
||||
//1 = 1 minute
|
||||
private float gameTime;
|
||||
private float gameTime; // real seconds elapsed since beginning
|
||||
public int GameTime { get { return (int)(gameTime * TimeScale); } }
|
||||
//Time of day, between 0 minute to 1440 minutes (a day)
|
||||
public int DayTime { get { return GameTime % (24*60); } }
|
||||
|
||||
private int lastHour = -1;
|
||||
|
||||
private float globalAwareness; //on a scale from 0 to 1
|
||||
public float GlobalAwareness { get { return globalAwareness; } }
|
||||
@ -32,7 +36,12 @@ namespace DeathBook.Model
|
||||
public void Update(float deltaTime)
|
||||
{
|
||||
gameTime += deltaTime;
|
||||
NotifyObservers();
|
||||
int hour = DayTime / 60;
|
||||
if (hour != lastHour)
|
||||
{
|
||||
lastHour = hour;
|
||||
NotifyObservers();
|
||||
}
|
||||
|
||||
//TODO Global awareness - start trends
|
||||
}
|
||||
|
||||
@ -133,9 +133,20 @@ namespace DeathBook.Model
|
||||
private Person CreatePerson(int id, float x, float y, float z)
|
||||
{
|
||||
Vector3 pos = new Vector3(x, y, z);
|
||||
//Vector2 times =
|
||||
//Value between 3 and 21
|
||||
float connectionDuration = Utils.GetRandomValue(12, 9, 3);
|
||||
int connectionTime = Random.Range(0, 24 * 60);
|
||||
int disconnectionTime = (connectionTime + (int)(connectionDuration * 60)) % (24 * 60);
|
||||
float freq = Utils.GetRandomValue(0, 1, 3);
|
||||
|
||||
Person p = new Person(id, pos);
|
||||
bool isFemale = Random.value <= 0.5;
|
||||
|
||||
string fName = "Fifi"; //isFemale ? NameGenerator.GetFemaleName() : NameGenerator.GetMaleName();
|
||||
string lName = "Brindacier"; //NameGenerator.GetLastName();
|
||||
|
||||
Sprite pic = isFemale ? PictureGenerator.GetFemalePicture() : PictureGenerator.GetMalePicture();
|
||||
|
||||
Person p = new Person(id, fName, lName, pos, connectionTime, disconnectionTime, freq, pic);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
@ -28,14 +28,13 @@ namespace DeathBook.Model
|
||||
private int friendCount = 0;
|
||||
public int FriendCount { get { return friendCount; } }
|
||||
|
||||
private int timeBetweenPosts; // f = 1/T;
|
||||
public int TimeBetweenPosts { get { return timeBetweenPosts; } }
|
||||
private float postFrequency; //on a scale from 0 to 1
|
||||
public float PostFrequency { get { return postFrequency; } }
|
||||
|
||||
private float connectionTime;
|
||||
public float ConnectionTime { get { return connectionTime; } }
|
||||
|
||||
private float disconnectionTime;
|
||||
public float DisconnectionTime { get { return disconnectionTime; } }
|
||||
private int connectionTime;
|
||||
public int ConnectionTime { get { return connectionTime; } }
|
||||
private int disconnectionTime;
|
||||
public int DisconnectionTime { get { return disconnectionTime; } }
|
||||
|
||||
private float awarenessLevel = 0; //on a scale from 0 to 1
|
||||
public float AwarenessLevel { get { return awarenessLevel; } }
|
||||
@ -44,23 +43,27 @@ namespace DeathBook.Model
|
||||
public bool Alive { get { return alive; } }
|
||||
|
||||
private bool online = true;
|
||||
public bool Online { get { return online; } }
|
||||
public bool Online { get { return online; } set { online = value; NotifyObservers(); } }
|
||||
|
||||
private Sprite picture;
|
||||
public Sprite Picture { get { return picture; } }
|
||||
|
||||
private Action onSelected;
|
||||
public Action OnSelected {get {return onSelected;} set { onSelected = value; } }
|
||||
|
||||
public Person(int id, Vector3 pos)
|
||||
public Person(int id, string fName, string lName, Vector3 pos, int conn, int disconn, float freq, Sprite pic)
|
||||
{
|
||||
this.id = id;
|
||||
initialPosition = pos;
|
||||
this.firstName = fName;
|
||||
this.lastName = lName;
|
||||
this.initialPosition = pos;
|
||||
this.connectionTime = conn;
|
||||
this.disconnectionTime = disconn;
|
||||
Debug.Log("I am " + id + " and I connect at " + Utils.GetTimeString(connectionTime) + " until " + Utils.GetTimeString(disconnectionTime));
|
||||
this.postFrequency = freq;
|
||||
this.picture = pic;
|
||||
|
||||
// TODO Use names from db
|
||||
firstName = "Mark";
|
||||
lastName = "Zuckerberg";
|
||||
|
||||
// For testing purposes
|
||||
picture = UnityEngine.Random.Range(0, 2) == 0 ? PictureGenerator.GetFemalePicture() : PictureGenerator.GetMalePicture();
|
||||
online = IsOnline(0);
|
||||
}
|
||||
|
||||
public void AddFriendship(Friendship f)
|
||||
@ -78,13 +81,18 @@ namespace DeathBook.Model
|
||||
deadFriendsList.Add(f);
|
||||
}
|
||||
|
||||
public void Kill()
|
||||
public bool Kill()
|
||||
{
|
||||
if (Online)
|
||||
return false;
|
||||
|
||||
Debug.Log("Person " + id + " died!");
|
||||
alive = false;
|
||||
foreach (Friendship f in friendsList)
|
||||
f.Friend.NotifyFriendWasKilled(f.Other);
|
||||
f.Other.NotifyFriendWasKilled();
|
||||
NotifyObservers();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void NoticeDeath(Friendship f)
|
||||
@ -96,12 +104,22 @@ namespace DeathBook.Model
|
||||
NotifyObservers();
|
||||
}
|
||||
|
||||
//Time in hours
|
||||
private bool IsOnline(int time)
|
||||
{
|
||||
if (ConnectionTime < DisconnectionTime)
|
||||
return (time > ConnectionTime && time < DisconnectionTime);
|
||||
return !(time < ConnectionTime && time > DisconnectionTime);
|
||||
}
|
||||
|
||||
public void Update(float deltaTime)
|
||||
{
|
||||
//TODO Update if connected
|
||||
int time = LevelManager.Instance.GameLevel.GameTime;
|
||||
int time = LevelManager.Instance.GameLevel.DayTime;
|
||||
|
||||
bool isOnline = IsOnline(time);
|
||||
|
||||
if (isOnline != Online)
|
||||
Online = isOnline;
|
||||
|
||||
//The following actions are only performed if user is online
|
||||
if (!Online)
|
||||
@ -110,5 +128,13 @@ namespace DeathBook.Model
|
||||
foreach (Friendship f in deadFriendsList)
|
||||
f.Update(deltaTime);
|
||||
}
|
||||
|
||||
public void SelectNode()
|
||||
{
|
||||
if (OnSelected != null)
|
||||
{
|
||||
OnSelected();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -28,5 +28,10 @@ namespace DeathBook.Model
|
||||
}
|
||||
return (sum / numSteps * 2 - 1) * range + mean;
|
||||
}
|
||||
|
||||
public static string GetTimeString(int time)
|
||||
{
|
||||
return time / 60 + "h " + time % 60 + "m";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DeathBook.Model;
|
||||
|
||||
public class NetworkingSphere : MonoBehaviour
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DeathBook.Model;
|
||||
|
||||
public class NetworkingSphere : MonoBehaviour
|
||||
{
|
||||
public GameObjectsOptions gameObjects = new GameObjectsOptions();
|
||||
public LevelOptions levelOptions = new LevelOptions();
|
||||
@ -23,72 +23,76 @@ public class NetworkingSphere : MonoBehaviour
|
||||
public int AvgNumFriends = 20;
|
||||
public float FriendshipLikeliness = 0.4f;
|
||||
public float SphereRadius = 1f;
|
||||
}
|
||||
|
||||
public float rotationSpeed = 0.7f;
|
||||
public float torqueForce = 50f;
|
||||
|
||||
public PersonDetailsPanel DetailsPanel;
|
||||
|
||||
private bool dragging = false;
|
||||
private Vector3 delta = new Vector3();
|
||||
}
|
||||
|
||||
public float rotationSpeed = 0.7f;
|
||||
public float torqueForce = 50f;
|
||||
|
||||
public PersonDetailsPanel DetailsPanel;
|
||||
|
||||
private bool dragging = false;
|
||||
private Vector3 delta = new Vector3();
|
||||
private Rigidbody rb;
|
||||
|
||||
private LevelManager manager;
|
||||
|
||||
private PersonNode[] peopleNodes;
|
||||
|
||||
private PersonNode _selectedNode;
|
||||
|
||||
void Awake()
|
||||
private LevelManager manager;
|
||||
|
||||
private PersonNode[] peopleNodes;
|
||||
|
||||
private PersonNode _selectedNode;
|
||||
|
||||
// Used to disable the physics when the user has clicked on a node
|
||||
private bool _isRotatingTowardsNode = false;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
manager = LevelManager.Instance;
|
||||
manager.NewLevel(levelOptions.NumPeople, levelOptions.AvgNumFriends, levelOptions.FriendshipLikeliness, levelOptions.SphereRadius);
|
||||
Level lvl = manager.GameLevel;
|
||||
|
||||
InstantiateNodes(lvl);
|
||||
AssignLinks(lvl);
|
||||
rb = GetComponent<Rigidbody>();
|
||||
Level lvl = manager.GameLevel;
|
||||
|
||||
InstantiateNodes(lvl);
|
||||
AssignLinks(lvl);
|
||||
rb = GetComponent<Rigidbody>();
|
||||
}
|
||||
|
||||
/*void OnGUI()
|
||||
void OnGUI()
|
||||
{
|
||||
GUI.Button(new Rect(10, 100, 400, 40), manager.GameLevel.GameTime + "");
|
||||
}*/
|
||||
|
||||
void Update()
|
||||
int time = manager.GameLevel.DayTime;
|
||||
GUI.Button(new Rect(50, 50, 100, 40), Utils.GetTimeString(time));
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
manager.GameLevel.Update(Time.deltaTime);
|
||||
|
||||
//TEMPORARY QUICK FIX: Even though we are never moving the sphere, it starts moving as soon as it stops rotating
|
||||
transform.position = Vector3.zero;
|
||||
|
||||
Vector3 screenMousePos = Input.mousePosition;
|
||||
|
||||
screenMousePos.z = transform.position.z - Camera.main.transform.position.z;
|
||||
|
||||
Vector3 worldMousePos = Camera.main.ScreenToWorldPoint(screenMousePos);
|
||||
|
||||
manager.GameLevel.Update(Time.deltaTime);
|
||||
|
||||
//TEMPORARY QUICK FIX: Even though we are never moving the sphere, it starts moving as soon as it stops rotating
|
||||
transform.position = Vector3.zero;
|
||||
|
||||
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) > levelOptions.SphereRadius + 1f)
|
||||
{
|
||||
transform.Rotate(Vector3.one * Time.deltaTime * rotationSpeed);
|
||||
}
|
||||
|
||||
//when right btn clicked, call the change rotation
|
||||
if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
dragging = true;
|
||||
}
|
||||
else if (Input.GetMouseButtonUp(1))
|
||||
{
|
||||
dragging = false;
|
||||
delta = new Vector3();
|
||||
}
|
||||
|
||||
if (dragging)
|
||||
{
|
||||
MoveSphere();
|
||||
if (Mathf.Sqrt(worldMousePos.x * worldMousePos.x + worldMousePos.y * worldMousePos.y) > levelOptions.SphereRadius + 1f)
|
||||
{
|
||||
transform.Rotate(Vector3.one * Time.deltaTime * rotationSpeed);
|
||||
}
|
||||
|
||||
//when right btn clicked, call the change rotation
|
||||
if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
dragging = true;
|
||||
}
|
||||
else if (Input.GetMouseButtonUp(1))
|
||||
{
|
||||
dragging = false;
|
||||
delta = new Vector3();
|
||||
}
|
||||
|
||||
if (dragging && !_isRotatingTowardsNode)
|
||||
{
|
||||
MoveSphere();
|
||||
}
|
||||
|
||||
|
||||
@ -100,71 +104,135 @@ public class NetworkingSphere : MonoBehaviour
|
||||
{
|
||||
Camera.main.fieldOfView -= Input.GetAxis("Mouse ScrollWheel") * 10f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MoveSphere()
|
||||
{
|
||||
float deltaX = Input.GetAxis("Mouse X");
|
||||
float deltaY = Input.GetAxis("Mouse Y");
|
||||
if (deltaX == 0 && deltaY == 0)
|
||||
{
|
||||
delta = new Vector3();
|
||||
rb.angularVelocity *= 0.8f;
|
||||
}
|
||||
delta += new Vector3(deltaX, deltaY, 0);
|
||||
|
||||
rb.AddTorque(Vector3.down * delta.x * torqueForce * Time.deltaTime, ForceMode.Impulse);
|
||||
rb.AddTorque(Vector3.right * delta.y * torqueForce * Time.deltaTime, ForceMode.Impulse);
|
||||
}
|
||||
|
||||
private void InstantiateNodes(Level lvl)
|
||||
{
|
||||
peopleNodes = new PersonNode[lvl.People.Count];
|
||||
|
||||
for (int i = 0; i < lvl.People.Count; i++)
|
||||
{
|
||||
Person person = lvl.People[i];
|
||||
|
||||
PersonNode pInst = Instantiate(gameObjects.PersonObj, person.InitialPosition, Quaternion.identity) as PersonNode;
|
||||
|
||||
pInst.OnClicked += OnNodeClicked;
|
||||
|
||||
pInst.Model = person;
|
||||
pInst.transform.parent = this.transform;
|
||||
|
||||
peopleNodes[i] = pInst;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnNodeClicked(PersonNode node)
|
||||
{
|
||||
if (_selectedNode != null)
|
||||
{
|
||||
_selectedNode.Select(false);
|
||||
}
|
||||
}
|
||||
|
||||
void MoveSphere()
|
||||
{
|
||||
float deltaX = Input.GetAxis("Mouse X");
|
||||
float deltaY = Input.GetAxis("Mouse Y");
|
||||
if (deltaX == 0 && deltaY == 0)
|
||||
{
|
||||
delta = new Vector3();
|
||||
rb.angularVelocity *= 0.8f;
|
||||
}
|
||||
delta += new Vector3(deltaX, deltaY, 0);
|
||||
|
||||
rb.AddTorque(Vector3.down * delta.x * torqueForce * Time.deltaTime, ForceMode.Impulse);
|
||||
rb.AddTorque(Vector3.right * delta.y * torqueForce * Time.deltaTime, ForceMode.Impulse);
|
||||
}
|
||||
|
||||
private void InstantiateNodes(Level lvl)
|
||||
{
|
||||
peopleNodes = new PersonNode[lvl.People.Count];
|
||||
|
||||
for (int i = 0; i < lvl.People.Count; i++)
|
||||
{
|
||||
Person person = lvl.People[i];
|
||||
|
||||
PersonNode pInst = Instantiate(gameObjects.PersonObj, person.InitialPosition, Quaternion.identity) as PersonNode;
|
||||
|
||||
pInst.OnClicked += OnNodeClicked;
|
||||
|
||||
pInst.Model = person;
|
||||
pInst.transform.parent = this.transform;
|
||||
|
||||
peopleNodes[i] = pInst;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnNodeClicked(PersonNode node)
|
||||
{
|
||||
if (node == _selectedNode) return;
|
||||
|
||||
if (_selectedNode != null)
|
||||
{
|
||||
_selectedNode.Select(false);
|
||||
}
|
||||
|
||||
node.Kill();
|
||||
|
||||
DetailsPanel.SetNode(node);
|
||||
node.Select(true);
|
||||
|
||||
_selectedNode = node;
|
||||
}
|
||||
|
||||
private void AssignLinks(Level lvl)
|
||||
{
|
||||
foreach (FriendshipLink f in lvl.Friendships)
|
||||
DetailsPanel.SetNode(node);
|
||||
node.Select(true);
|
||||
|
||||
_selectedNode = node;
|
||||
|
||||
// Testing to see how it looks and feels like
|
||||
FocusOnNode(node);
|
||||
}
|
||||
|
||||
private void AssignLinks(Level lvl)
|
||||
{
|
||||
foreach (FriendshipLink f in lvl.Friendships)
|
||||
{
|
||||
Link link = Instantiate(gameObjects.LinkObj) as Link;
|
||||
int id1 = f.Friend1.id;
|
||||
Link link = Instantiate(gameObjects.LinkObj) as Link;
|
||||
int id1 = f.Friend1.id;
|
||||
int id2 = f.Friend2.id;
|
||||
link.Model = f;
|
||||
link.AttachToObjects(peopleNodes[id1].gameObject, peopleNodes[id2].gameObject);
|
||||
|
||||
// Temporary stuff, for testing
|
||||
peopleNodes[id1].AddLink(link);
|
||||
peopleNodes[id2].AddLink(link);
|
||||
}
|
||||
}
|
||||
}
|
||||
link.Model = f;
|
||||
link.AttachToObjects(peopleNodes[id1].gameObject, peopleNodes[id2].gameObject);
|
||||
|
||||
// Temporary stuff, for testing
|
||||
peopleNodes[id1].AddLink(link);
|
||||
peopleNodes[id2].AddLink(link);
|
||||
}
|
||||
}
|
||||
|
||||
public void FocusOnNode(PersonNode node)
|
||||
{
|
||||
StopCoroutine("RotateTowardsNodeCoroutine");
|
||||
StartCoroutine("RotateTowardsNodeCoroutine", node);
|
||||
|
||||
/*
|
||||
Debug.Log(node.transform.eulerAngles);
|
||||
|
||||
float xangle = (Mathf.Atan2(finalPos.z, finalPos.y) - Mathf.Atan2(initialPos.z, initialPos.y)) * Mathf.Rad2Deg;
|
||||
|
||||
Debug.Log(node.transform.position);
|
||||
transform.Rotate(new Vector3(90, 0, 0));
|
||||
//transform.rotation = transform.rotation * Quaternion.AngleAxis(xangle, Vector3.right);
|
||||
Debug.Log(xangle);
|
||||
float yAngle = (Mathf.Atan2(finalPos.x, finalPos.z) - Mathf.Atan2(node.transform.position.x, node.transform.position.z)) * Mathf.Rad2Deg;
|
||||
Debug.Log(yAngle);
|
||||
//transform.Rotate(new Vector3(xangle, yAngle, 0));
|
||||
|
||||
//float zAngle = (Mathf.Atan2(finalPos.y, finalPos.x) - Mathf.Atan2(initialPos.y, initialPos.x)) * Mathf.Rad2Deg;
|
||||
|
||||
//transform.rotation = transform.rotation * Quaternion.AngleAxis(xangle, Vector3.right) * Quaternion.AngleAxis(yAngle, Vector3.up) * Quaternion.AngleAxis(zAngle, Vector3.forward);
|
||||
*/
|
||||
}
|
||||
|
||||
private IEnumerator RotateTowardsNodeCoroutine(PersonNode node)
|
||||
{
|
||||
_isRotatingTowardsNode = true;
|
||||
rb.angularVelocity = Vector3.zero;
|
||||
|
||||
//Vector3 finalPos = new Vector3(0f, 0f, -SphereRadius);
|
||||
|
||||
Quaternion initialRot = transform.localRotation;
|
||||
|
||||
|
||||
transform.localRotation = Quaternion.identity; // Temporary hack for the game jam
|
||||
|
||||
|
||||
Vector3 nodePos = node.transform.position;
|
||||
|
||||
Vector3 longDir = nodePos;
|
||||
longDir.y = 0;
|
||||
|
||||
float xAngle = Mathf.Asin(nodePos.normalized.y) * Mathf.Rad2Deg; // Latitude
|
||||
float yAngle = Vector3.Angle(-Vector3.forward, longDir) * (longDir.x < 0 ? -1 : 1); // Longitude
|
||||
|
||||
Quaternion finalRot = Quaternion.AngleAxis(-xAngle, Vector3.right) * Quaternion.AngleAxis(yAngle, Vector3.up);
|
||||
|
||||
float ratio = 0f;
|
||||
|
||||
while (ratio < 1f)
|
||||
{
|
||||
ratio += Time.deltaTime / 1.5f;
|
||||
|
||||
transform.localRotation = Quaternion.Lerp(initialRot, finalRot, Mathf.SmoothStep(0f, 1f, ratio));
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
_isRotatingTowardsNode = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,99 +1,102 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using UnityEngine.UI;
|
||||
using DeathBook.Model;
|
||||
using DeathBook.Util;
|
||||
|
||||
public class PersonDetailsPanel : MonoBehaviour, IObserver
|
||||
{
|
||||
public Image ProfilePicture;
|
||||
public Text Name;
|
||||
public GameObject FriendsPanel;
|
||||
public Button KillButton;
|
||||
public Button WatchButton;
|
||||
public Button XButton;
|
||||
public GameObject Container;
|
||||
|
||||
public Image UIFriendPicture;
|
||||
|
||||
private PersonNode _node;
|
||||
private Person _model;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
Container.SetActive(false);
|
||||
}
|
||||
|
||||
public void SetNode(PersonNode node)
|
||||
{
|
||||
if (_model != null)
|
||||
{
|
||||
_model.UnSubscribe(this);
|
||||
}
|
||||
|
||||
_node = node;
|
||||
_model = node.Model;
|
||||
|
||||
_model.Subscribe(this);
|
||||
|
||||
Container.SetActive(true);
|
||||
|
||||
UpdateInfo();
|
||||
}
|
||||
|
||||
public void Notify()
|
||||
{
|
||||
UpdateInfo();
|
||||
}
|
||||
|
||||
private void UpdateInfo()
|
||||
{
|
||||
Name.text = _model.Name;
|
||||
|
||||
foreach (Transform picture in FriendsPanel.transform)
|
||||
{
|
||||
Destroy(picture.gameObject);
|
||||
}
|
||||
|
||||
ProfilePicture.sprite = _model.Picture;
|
||||
|
||||
RectTransform panelTrans = FriendsPanel.GetComponent<RectTransform>();
|
||||
|
||||
panelTrans.anchorMin = new Vector2(0f, -0.3125f * _model.FriendList.Count);
|
||||
panelTrans.anchorMax = new Vector2(1f, 1f);
|
||||
panelTrans.offsetMin = Vector2.zero;
|
||||
panelTrans.offsetMax = Vector2.zero;
|
||||
|
||||
float height = 1f / _model.FriendList.Count;
|
||||
|
||||
for (int i = 0; i < _model.FriendList.Count; i++)
|
||||
{
|
||||
Person friend = _model.FriendList[i].Friend;
|
||||
|
||||
Image friendPicture = Instantiate(UIFriendPicture) as Image;
|
||||
|
||||
friendPicture.sprite = friend.Picture;
|
||||
|
||||
friendPicture.transform.SetParent(FriendsPanel.transform);
|
||||
friendPicture.rectTransform.anchorMin = new Vector2(0.022f, 1f - (height - 0.01f) * (i + 1) - i * 0.01f);
|
||||
friendPicture.rectTransform.anchorMax = new Vector2(0.26f, (1f - height * i));
|
||||
friendPicture.rectTransform.offsetMin = Vector2.zero;
|
||||
friendPicture.rectTransform.offsetMax = Vector2.zero;
|
||||
|
||||
if (i == _model.FriendList.Count - 1)
|
||||
{
|
||||
Debug.Log(friendPicture.rectTransform.position);
|
||||
}
|
||||
else if (i == 0)
|
||||
{
|
||||
Debug.Log(friendPicture.rectTransform.position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
Container.SetActive(false);
|
||||
_node.Select(false);
|
||||
}
|
||||
}
|
||||
using DeathBook.Util;
|
||||
|
||||
public class PersonDetailsPanel : MonoBehaviour, IObserver
|
||||
{
|
||||
public Image ProfilePicture;
|
||||
public Text Name;
|
||||
public GameObject FriendsPanel;
|
||||
public Button KillButton;
|
||||
public Button WatchButton;
|
||||
public Button XButton;
|
||||
public GameObject Container;
|
||||
|
||||
public UIFriendPicture FriendPicture;
|
||||
|
||||
private PersonNode _node;
|
||||
private Person _model;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
Container.SetActive(false);
|
||||
}
|
||||
|
||||
public void SetNode(PersonNode node)
|
||||
{
|
||||
if (_model != null)
|
||||
{
|
||||
_model.UnSubscribe(this);
|
||||
}
|
||||
|
||||
_node = node;
|
||||
_model = node.Model;
|
||||
|
||||
_model.Subscribe(this);
|
||||
|
||||
Container.SetActive(true);
|
||||
|
||||
UpdateInfo();
|
||||
}
|
||||
|
||||
public void Notify()
|
||||
{
|
||||
UpdateInfo();
|
||||
}
|
||||
|
||||
private void UpdateInfo()
|
||||
{
|
||||
Name.text = _model.Name;
|
||||
|
||||
KillButton.gameObject.SetActive(_model.Alive);
|
||||
WatchButton.gameObject.SetActive(_model.Alive);
|
||||
|
||||
foreach (Transform picture in FriendsPanel.transform)
|
||||
{
|
||||
Destroy(picture.gameObject);
|
||||
}
|
||||
|
||||
ProfilePicture.sprite = _model.Picture;
|
||||
|
||||
RectTransform panelTrans = FriendsPanel.GetComponent<RectTransform>();
|
||||
|
||||
panelTrans.anchorMin = new Vector2(0f, -0.3125f * _model.FriendList.Count);
|
||||
panelTrans.anchorMax = new Vector2(1f, 1f);
|
||||
panelTrans.offsetMin = Vector2.zero;
|
||||
panelTrans.offsetMax = Vector2.zero;
|
||||
|
||||
float height = 1f / _model.FriendList.Count;
|
||||
|
||||
for (int i = 0; i < _model.FriendList.Count; i++)
|
||||
{
|
||||
Person friend = _model.FriendList[i].Friend;
|
||||
|
||||
UIFriendPicture friendPicture = Instantiate(FriendPicture) as UIFriendPicture;
|
||||
|
||||
friendPicture.Model = friend;
|
||||
|
||||
Image picture = friendPicture.Picture;
|
||||
|
||||
picture.sprite = friend.Picture;
|
||||
|
||||
picture.transform.SetParent(FriendsPanel.transform);
|
||||
picture.rectTransform.anchorMin = new Vector2(0.022f, 1f - (height - 0.01f) * (i + 1) - i * 0.01f);
|
||||
picture.rectTransform.anchorMax = new Vector2(0.26f, (1f - height * i));
|
||||
picture.rectTransform.offsetMin = Vector2.zero;
|
||||
picture.rectTransform.offsetMax = Vector2.zero;
|
||||
}
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
Container.SetActive(false);
|
||||
_node.Select(false);
|
||||
}
|
||||
|
||||
public void KillNode()
|
||||
{
|
||||
_node.Kill();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,177 +1,178 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DeathBook.Model;
|
||||
using DeathBook.Util;
|
||||
using System;
|
||||
|
||||
[RequireComponent(typeof(Collider))]
|
||||
public class PersonNode : MonoBehaviour, IObserver
|
||||
using DeathBook.Util;
|
||||
using System;
|
||||
|
||||
[RequireComponent(typeof(Collider))]
|
||||
public class PersonNode : MonoBehaviour, IObserver
|
||||
{
|
||||
private const float UpdateFrequency = 0.5f;
|
||||
private float time = 0;
|
||||
|
||||
public Action<PersonNode> OnClicked;
|
||||
|
||||
public Color SelectedColor = Color.blue;
|
||||
|
||||
public Color StartColor = Color.green;
|
||||
public Color MiddleColor = Color.yellow;
|
||||
public Color EndColor = Color.red;
|
||||
|
||||
public Renderer internQuad;
|
||||
public Renderer xQuad;
|
||||
|
||||
private List<Link> _links;
|
||||
private bool _highlighted = false;
|
||||
private bool _selected = false;
|
||||
|
||||
private Person _model;
|
||||
private Renderer _renderer;
|
||||
private float time = 0;
|
||||
|
||||
public Action<PersonNode> OnClicked;
|
||||
|
||||
public Color SelectedColor = Color.blue;
|
||||
|
||||
public Color StartColor = Color.green;
|
||||
public Color MiddleColor = Color.yellow;
|
||||
public Color EndColor = Color.red;
|
||||
|
||||
public Renderer internQuad;
|
||||
public Renderer xQuad;
|
||||
|
||||
private List<Link> _links;
|
||||
private bool _highlighted = false;
|
||||
private bool _selected = false;
|
||||
|
||||
private Person _model;
|
||||
private Renderer _renderer;
|
||||
private Transform _transform;
|
||||
|
||||
|
||||
public Person Model
|
||||
{
|
||||
get { return _model; }
|
||||
set
|
||||
{
|
||||
_model = value;
|
||||
_model.Subscribe(this);
|
||||
UpdateInfo();
|
||||
SetProfilePicture();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetProfilePicture()
|
||||
{
|
||||
internQuad.material.mainTexture = _model.Picture.texture;
|
||||
internQuad.material.SetTexture("_MainTex", _model.Picture.texture);
|
||||
}
|
||||
|
||||
void Awake()
|
||||
{
|
||||
_links = new List<Link>();
|
||||
_renderer = GetComponent<Renderer>();
|
||||
_transform = GetComponent<Transform>();
|
||||
}
|
||||
|
||||
void Update()
|
||||
|
||||
|
||||
public Person Model
|
||||
{
|
||||
get { return _model; }
|
||||
set
|
||||
{
|
||||
_model = value;
|
||||
_model.Subscribe(this);
|
||||
_model.OnSelected += () => { OnClicked(this); };
|
||||
UpdateInfo();
|
||||
SetProfilePicture();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetProfilePicture()
|
||||
{
|
||||
internQuad.material.mainTexture = _model.Picture.texture;
|
||||
internQuad.material.SetTexture("_MainTex", _model.Picture.texture);
|
||||
}
|
||||
|
||||
void Awake()
|
||||
{
|
||||
_links = new List<Link>();
|
||||
_renderer = GetComponent<Renderer>();
|
||||
_transform = GetComponent<Transform>();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
time += Time.deltaTime;
|
||||
if (time > UpdateFrequency)
|
||||
{
|
||||
_model.Update(time);
|
||||
time = 0;
|
||||
}
|
||||
|
||||
// Find another way to do it if it lags to much
|
||||
_transform.LookAt(new Vector3(_transform.position.x, _transform.position.y, _transform.position.z + 1));
|
||||
}
|
||||
|
||||
public void AddLink(Link link)
|
||||
{
|
||||
_links.Add(link);
|
||||
}
|
||||
|
||||
public void Select(bool state)
|
||||
{
|
||||
_selected = state;
|
||||
UpdateLinks(state);
|
||||
|
||||
if (state)
|
||||
{
|
||||
_renderer.material.color = SelectedColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateInfo();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateLinks(bool isHighlighted)
|
||||
{
|
||||
foreach (Link link in _links)
|
||||
{
|
||||
link.Highlight(isHighlighted);
|
||||
}
|
||||
}
|
||||
|
||||
// Find another way to do it if it lags to much
|
||||
_transform.LookAt(new Vector3(_transform.position.x, _transform.position.y, _transform.position.z + 1));
|
||||
}
|
||||
|
||||
public void AddLink(Link link)
|
||||
{
|
||||
_links.Add(link);
|
||||
}
|
||||
|
||||
public void Select(bool state)
|
||||
{
|
||||
_selected = state;
|
||||
UpdateLinks(state);
|
||||
|
||||
if (state)
|
||||
{
|
||||
_renderer.material.color = SelectedColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateInfo();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateLinks(bool isHighlighted)
|
||||
{
|
||||
foreach (Link link in _links)
|
||||
{
|
||||
link.Highlight(isHighlighted);
|
||||
}
|
||||
}
|
||||
|
||||
public void Kill()
|
||||
{
|
||||
_model.Kill();
|
||||
}
|
||||
|
||||
public void Notify()
|
||||
}
|
||||
|
||||
public void Notify()
|
||||
{
|
||||
//Debug.Log("Received notification! " + Model.AwarenessLevel);
|
||||
UpdateInfo();
|
||||
}
|
||||
|
||||
private void UpdateInfo()
|
||||
{
|
||||
//If dead -> set offline until all friends are aware, then add a big red X to profile pic
|
||||
if (_model.Alive)
|
||||
{
|
||||
xQuad.enabled = false;
|
||||
SetColors();
|
||||
}
|
||||
else
|
||||
{
|
||||
xQuad.enabled = true;
|
||||
gameObject.GetComponent<Renderer>().material.color = new Color32(50, 50, 50, 1);
|
||||
UpdateLinks(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetColors()
|
||||
{
|
||||
//set greyed out for offline
|
||||
if (_model.Online)
|
||||
{
|
||||
internQuad.material.color = new Color32(255, 255, 255, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
internQuad.material.color = new Color32(80, 80, 80, 1);
|
||||
}
|
||||
|
||||
if (_model.AwarenessLevel < 0.5)
|
||||
{
|
||||
gameObject.GetComponent<Renderer>().material.color = Color.Lerp(StartColor, MiddleColor, _model.AwarenessLevel * 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
gameObject.GetComponent<Renderer>().material.color = Color.Lerp(MiddleColor, EndColor, _model.AwarenessLevel * 2 - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void OnMouseEnter()
|
||||
{
|
||||
if (!_selected && !_highlighted)
|
||||
{
|
||||
UpdateLinks(true);
|
||||
}
|
||||
|
||||
_highlighted = true;
|
||||
}
|
||||
|
||||
void OnMouseExit()
|
||||
{
|
||||
if (!_selected)
|
||||
{
|
||||
UpdateLinks(false);
|
||||
}
|
||||
|
||||
_highlighted = false;
|
||||
}
|
||||
|
||||
void OnMouseDown()
|
||||
{
|
||||
// The sphere should be subscribed to this event and update the data accordingly
|
||||
if (OnClicked != null)
|
||||
{
|
||||
OnClicked(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Debug.Log("Received notification! " + Model.AwarenessLevel);
|
||||
UpdateInfo();
|
||||
}
|
||||
|
||||
private void UpdateInfo()
|
||||
{
|
||||
//If dead -> set offline until all friends are aware, then add a big red X to profile pic
|
||||
if (_model.Alive)
|
||||
{
|
||||
xQuad.enabled = false;
|
||||
SetColors();
|
||||
}
|
||||
else
|
||||
{
|
||||
xQuad.enabled = true;
|
||||
gameObject.GetComponent<Renderer>().material.color = new Color32(50, 50, 50, 1);
|
||||
UpdateLinks(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetColors()
|
||||
{
|
||||
//set greyed out for offline
|
||||
if (_model.Online)
|
||||
{
|
||||
internQuad.material.color = new Color32(255, 255, 255, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
internQuad.material.color = new Color32(80, 80, 80, 1);
|
||||
}
|
||||
|
||||
if (_model.AwarenessLevel < 0.5)
|
||||
{
|
||||
gameObject.GetComponent<Renderer>().material.color = Color.Lerp(StartColor, MiddleColor, _model.AwarenessLevel * 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
gameObject.GetComponent<Renderer>().material.color = Color.Lerp(MiddleColor, EndColor, _model.AwarenessLevel * 2 - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void OnMouseEnter()
|
||||
{
|
||||
if (!_selected && !_highlighted)
|
||||
{
|
||||
UpdateLinks(true);
|
||||
}
|
||||
|
||||
_highlighted = true;
|
||||
}
|
||||
|
||||
void OnMouseExit()
|
||||
{
|
||||
if (!_selected)
|
||||
{
|
||||
UpdateLinks(false);
|
||||
}
|
||||
|
||||
_highlighted = false;
|
||||
}
|
||||
|
||||
void OnMouseDown()
|
||||
{
|
||||
// The sphere should be subscribed to this event and update the data accordingly
|
||||
if (OnClicked != null)
|
||||
{
|
||||
OnClicked(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
33
Assets/Scripts/UIFriendPicture.cs
Normal file
33
Assets/Scripts/UIFriendPicture.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using DeathBook.Model;
|
||||
using UnityEngine.UI;
|
||||
|
||||
[RequireComponent(typeof(Image))]
|
||||
public class UIFriendPicture : MonoBehaviour
|
||||
{
|
||||
private Person _model;
|
||||
|
||||
public Person Model
|
||||
{
|
||||
get { return _model; }
|
||||
set { _model = value; }
|
||||
}
|
||||
|
||||
private Image _picture;
|
||||
|
||||
public Image Picture
|
||||
{
|
||||
get { return _picture; }
|
||||
}
|
||||
|
||||
void Awake()
|
||||
{
|
||||
_picture = GetComponent<Image>();
|
||||
}
|
||||
|
||||
public void OnClick()
|
||||
{
|
||||
_model.SelectNode();
|
||||
}
|
||||
}
|
||||
12
Assets/Scripts/UIFriendPicture.cs.meta
Normal file
12
Assets/Scripts/UIFriendPicture.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 343d57f2bac42ae48ba9722c53e5526f
|
||||
timeCreated: 1439693427
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
x
Reference in New Issue
Block a user