浏览代码

Adding an outro sequence that shows the scores briefly before returning to the lobby. Adding basic UI layering for the minigame assets (target sequence renders over everything, cursors and names render over everything else, etc.).

/main/staging/ngo_minigame_cleanup
nathaniel.buck@unity3d.com 3 年前
当前提交
5b2e7b8c
共有 12 个文件被更改,包括 706 次插入48 次删除
  1. 8
      Assets/Art/Glyph/Symbols.png.meta
  2. 372
      Assets/Prefabs/NGO/InGameLogic.prefab
  3. 30
      Assets/Prefabs/NGO/IntroAnimation.anim
  4. 63
      Assets/Prefabs/NGO/IntroOutroAnimator.controller
  5. 4
      Assets/Prefabs/NGO/PlayerCursor.prefab
  6. 1
      Assets/Scripts/Infrastructure/Messenger.cs
  7. 15
      Assets/Scripts/Netcode/InGameRunner.cs
  8. 17
      Assets/Scripts/Netcode/IntroOutroRunner.cs
  9. 2
      Assets/Scripts/Netcode/Scorer.cs
  10. 3
      Assets/Scripts/Relay/RelayUtpHost.cs
  11. 231
      Assets/Prefabs/NGO/OutroAnimation.anim
  12. 8
      Assets/Prefabs/NGO/OutroAnimation.anim.meta

8
Assets/Art/Glyph/Symbols.png.meta


second: 14_moon
- first:
213: -431797579490579562
second: 15_god
second: 15_good
second: 16_devil
second: 16_evil
- first:
213: -2657090017763772448
second: 17_elemental

edges: []
weights: []
- serializedVersion: 2
name: 15_god
name: 15_good
rect:
serializedVersion: 2
x: 0

edges: []
weights: []
- serializedVersion: 2
name: 16_devil
name: 16_evil
rect:
serializedVersion: 2
x: 588

372
Assets/Prefabs/NGO/InGameLogic.prefab


- {fileID: 6532331214593598572}
- {fileID: 5289034077109495657}
- {fileID: 365796668369407178}
- {fileID: 1900156070638843258}
- {fileID: 8063659512749448051}
- {fileID: 155099452610090021}
- {fileID: 4867873282236140980}

--- !u!1 &413870477192997562
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6183038953491067537}
- component: {fileID: 3467201213797059681}
- component: {fileID: 7551353115262518356}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6183038953491067537
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 413870477192997562}
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: 9210454441405939118}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.35, y: 0}
m_AnchorMax: {x: 0.75, y: 0.15}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0}
--- !u!222 &3467201213797059681
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 413870477192997562}
m_CullTransparentMesh: 1
--- !u!114 &7551353115262518356
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 413870477192997562}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.5019608}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: df079b79a31b7ee458df2e5bbe02299a, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &421060454917747513
GameObject:
m_ObjectHideFlags: 0

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 485451675458297819}
m_RootOrder: 5
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3287911880781162359
MonoBehaviour:

m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 2
--- !u!1 &3213238192738118284
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1900156070638843258}
- component: {fileID: 7567334037548879440}
- component: {fileID: 6578805366504698793}
m_Layer: 5
m_Name: BackgroundCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1900156070638843258
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3213238192738118284}
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: 8160705085328016364}
m_Father: {fileID: 485451675458297819}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
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!223 &7567334037548879440
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3213238192738118284}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 1
m_Camera: {fileID: 8873025738981341763}
m_PlaneDistance: 15
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &6578805366504698793
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3213238192738118284}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!1 &3543179912105342660
GameObject:
m_ObjectHideFlags: 0

m_Children:
- {fileID: 6873234893560763838}
m_Father: {fileID: 8063659512749448051}
m_RootOrder: 5
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}

- {fileID: 1250806127447164487}
- {fileID: 669834599338486315}
- {fileID: 3812834876162241050}
m_Father: {fileID: 8063659512749448051}
m_Father: {fileID: 9210454441405939118}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.4, y: 0}

m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8063659512749448051}
m_Father: {fileID: 1900156070638843258}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}

- {fileID: 5954072923278860053}
- {fileID: 7025050144556213061}
- {fileID: 2076711798417445944}
- {fileID: 1117468865149428953}
m_RootOrder: 4
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}

m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &7090625697656719742
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9210454441405939118}
- component: {fileID: 4209823503756835878}
m_Layer: 5
m_Name: ScoreAndTargetPanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9210454441405939118
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7090625697656719742}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6183038953491067537}
- {fileID: 6730446115375840747}
- {fileID: 1522243555523151353}
- {fileID: 6399302101402788512}
m_Father: {fileID: 8063659512749448051}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!225 &4209823503756835878
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7090625697656719742}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 0
m_BlocksRaycasts: 0
m_IgnoreParentGroups: 0
--- !u!1 &7198212591520790505
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1117468865149428953}
- component: {fileID: 7558311442204729020}
- component: {fileID: 1846449903069473569}
m_Layer: 5
m_Name: OutroText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1117468865149428953
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7198212591520790505}
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: 2884208290717289317}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.2}
m_AnchorMax: {x: 1, y: 0.2}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7558311442204729020
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7198212591520790505}
m_CullTransparentMesh: 1
--- !u!114 &1846449903069473569
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7198212591520790505}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Returning to lobby...
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 008daa1b26adf2b4ba0fbd11b7f79b6e, type: 2}
m_sharedMaterial: {fileID: 7878303141229832600, guid: 008daa1b26adf2b4ba0fbd11b7f79b6e, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 52
m_fontSizeBase: 52
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &7244084094049670647
GameObject:
m_ObjectHideFlags: 0

m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8063659512749448051}
m_Father: {fileID: 9210454441405939118}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.6, y: 0}

m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 8160705085328016364}
- {fileID: 6730446115375840747}
- {fileID: 1522243555523151353}
- {fileID: 6399302101402788512}
- {fileID: 9210454441405939118}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}

m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_SortingLayerID: -2036983327
m_SortingOrder: 5
m_TargetDisplay: 0
--- !u!114 &3239721210338799976
MonoBehaviour:

m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8063659512749448051}
m_Father: {fileID: 9210454441405939118}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.6, y: 0}

objectReference: {fileID: 0}
- target: {fileID: 3229036008637484624, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
propertyPath: m_RootOrder
value: 6
value: 7
objectReference: {fileID: 0}
- target: {fileID: 3229036008637484624, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
propertyPath: m_AnchorMax.x

30
Assets/Prefabs/NGO/IntroAnimation.anim


m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path: TargetSequence/Target0
path: ScoreAndTargetPanel/TargetSequence/Target0
- curve:
serializedVersion: 2
m_Curve:

m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path: TargetSequence/Target1
path: ScoreAndTargetPanel/TargetSequence/Target1
- curve:
serializedVersion: 2
m_Curve:

m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path: TargetSequence/Target2
path: ScoreAndTargetPanel/TargetSequence/Target2
m_FloatCurves:
- curve:
serializedVersion: 2

m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 3070526428
path: 8702374
attribute: 3
script: {fileID: 0}
typeID: 4

path: 3221467978
path: 2005137712
attribute: 3
script: {fileID: 0}
typeID: 4

path: 1493885680
path: 4002064522
attribute: 3
script: {fileID: 0}
typeID: 4

m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.x
path: TargetSequence/Target0
path: ScoreAndTargetPanel/TargetSequence/Target0
classID: 224
script: {fileID: 0}
- curve:

m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.y
path: TargetSequence/Target0
path: ScoreAndTargetPanel/TargetSequence/Target0
classID: 224
script: {fileID: 0}
- curve:

m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.z
path: TargetSequence/Target0
path: ScoreAndTargetPanel/TargetSequence/Target0
classID: 224
script: {fileID: 0}
- curve:

m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.x
path: TargetSequence/Target1
path: ScoreAndTargetPanel/TargetSequence/Target1
classID: 224
script: {fileID: 0}
- curve:

m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.y
path: TargetSequence/Target1
path: ScoreAndTargetPanel/TargetSequence/Target1
classID: 224
script: {fileID: 0}
- curve:

m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.z
path: TargetSequence/Target1
path: ScoreAndTargetPanel/TargetSequence/Target1
classID: 224
script: {fileID: 0}
- curve:

m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.x
path: TargetSequence/Target2
path: ScoreAndTargetPanel/TargetSequence/Target2
classID: 224
script: {fileID: 0}
- curve:

m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.y
path: TargetSequence/Target2
path: ScoreAndTargetPanel/TargetSequence/Target2
classID: 224
script: {fileID: 0}
- curve:

m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.z
path: TargetSequence/Target2
path: ScoreAndTargetPanel/TargetSequence/Target2
classID: 224
script: {fileID: 0}
m_EulerEditorCurves: []

63
Assets/Prefabs/NGO/IntroOutroAnimator.controller


m_Name: IntroAnimation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_Transitions:
- {fileID: -2422862649711649101}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0

m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-2422862649711649101
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: DoOutro
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 6302186184720228616}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-915027616136477805
AnimatorState:
serializedVersion: 6

m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: DoOutro
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer

- serializedVersion: 1
m_State: {fileID: -4718454066486239908}
m_Position: {x: 330, y: 210, z: 0}
- serializedVersion: 1
m_State: {fileID: 6302186184720228616}
m_Position: {x: 330, y: 300, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []

m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: -915027616136477805}
--- !u!1102 &6302186184720228616
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: OutroAnimation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 0114c447b277a3647946290240759633, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:

4
Assets/Prefabs/NGO/PlayerCursor.prefab


m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_SortingOrder: 3
m_TargetDisplay: 0
--- !u!114 &407076462024115991
MonoBehaviour:

m_LightmapParameters: {fileID: 0}
m_SortingLayerID: -253801995
m_SortingLayer: 2
m_SortingOrder: 1
m_SortingOrder: 5
m_Sprite: {fileID: 21300000, guid: 9367b4ce9024f5b4090fabc2941d2116, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0

1
Assets/Scripts/Infrastructure/Messenger.cs


CompleteCountdown = 202,
MinigameBeginning = 203,
InstructionsShown = 204,
MinigameEnding = 205,
DisplayErrorPopup = 300,
}

15
Assets/Scripts/Netcode/InGameRunner.cs


public void OnSymbolDeactivated()
{
if (--m_remainingSymbolCount <= 0)
EndGame_ServerRpc();
WaitForEndingSequence();
}
/// <summary>

[ServerRpc]
private void EndGame_ServerRpc()
private void WaitForEndingSequence()
this.StartCoroutine(EndGame());
m_introOutroRunner.DoOutro(EndGame);
private IEnumerator EndGame()
private void EndGame()
// TODO: Something better.
yield return new WaitForSeconds(6);
StartCoroutine(EndGame_ClientsFirst());
}
private IEnumerator EndGame_ClientsFirst()
{
EndGame_ClientRpc();
yield return null;
m_onGameEnd();

17
Assets/Scripts/Netcode/IntroOutroRunner.cs


using UnityEngine;
using System;
using UnityEngine;
namespace LobbyRelaySample.ngo
{

public class IntroOutroRunner : MonoBehaviour
{
[SerializeField] private Animator m_animator;
private Action m_onOutroComplete;
public void DoIntro()
{

public void DoOutro(Action onOutroComplete)
{
m_onOutroComplete = onOutroComplete;
m_animator.SetTrigger("DoOutro");
}
/// <summary>
/// Called via an AnimationEvent.
/// </summary>

}
/// <summary>
/// Called via an AnimationEvent.
/// </summary>
public void OnOutroComplete()
{
m_onOutroComplete?.Invoke();
}
}
}

2
Assets/Scripts/Netcode/Scorer.cs


// Called on the host.
public void ScoreSuccess(ulong id)
{
int newScore = m_dataStore.UpdateScore(id, 2);
int newScore = m_dataStore.UpdateScore(id, 1);
UpdateScoreOutput_ClientRpc(id, newScore);
}

3
Assets/Scripts/Relay/RelayUtpHost.cs


}
/// <summary>
/// In an actual game, after the countdown, there would be some step here where the host and all clients sync up on game state, load assets, etc.
/// Here, we will instead just signal an "in-game" state that can be ended by the host.
/// After the countdown, the host and all clients need to be alerted to sync up on game state, load assets, etc.
/// </summary>
public void SendInGameState()
{

231
Assets/Prefabs/NGO/OutroAnimation.anim


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: OutroAnimation
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 3
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: InfoText/OutroText
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.15
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: ScoreAndTargetPanel
classID: 225
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: InfoText/WaitingText
classID: 1
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 2389439745
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 2885466011
attribute: 1574349066
script: {fileID: 0}
typeID: 225
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 3489324656
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 6
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 3
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: InfoText/OutroText
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.15
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: ScoreAndTargetPanel
classID: 225
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: InfoText/WaitingText
classID: 1
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events:
- time: 6
functionName: OnOutroComplete
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0

8
Assets/Prefabs/NGO/OutroAnimation.anim.meta


fileFormatVersion: 2
guid: 0114c447b277a3647946290240759633
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存