forked from cgvr/DeltaVR
created ShapeDetectionNPC with voicelines, moved shape detection minigame controller logic inside it
This commit is contained in:
@@ -7,8 +7,9 @@
|
|||||||
* kui midagi laeb (wire aktiivne), siis particle'id võiks voolata mööda toru
|
* kui midagi laeb (wire aktiivne), siis particle'id võiks voolata mööda toru
|
||||||
* highscore json tühjaks
|
* highscore json tühjaks
|
||||||
* quest marker järjest järgmise tegevuse kohal: mikrofon, siis nupud
|
* quest marker järjest järgmise tegevuse kohal: mikrofon, siis nupud
|
||||||
* character billboard:
|
* npc character:
|
||||||
* klaas on näha temast eespool
|
* klaas on näha temast eespool
|
||||||
|
* voicelines: list listidest, mille hulgast saab valida
|
||||||
|
|
||||||
Can't/Won't Do:
|
Can't/Won't Do:
|
||||||
* glTF loading: vahetada ära shader Universal render pipeline Lit, mitte panna buildi kaasa glTf oma - **ei saa, objekt on siis ilma tekstuurita, lihtsalt hall**
|
* glTF loading: vahetada ära shader Universal render pipeline Lit, mitte panna buildi kaasa glTf oma - **ei saa, objekt on siis ilma tekstuurita, lihtsalt hall**
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,554 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1758614216652057599
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6822286665445551211}
|
||||||
|
- component: {fileID: 7293572772725810188}
|
||||||
|
- component: {fileID: 3429438874807908211}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: MainImage
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &6822286665445551211
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1758614216652057599}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0.0006999999, y: 0.0007, z: 0.0007}
|
||||||
|
m_ConstrainProportionsScale: 1
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 5759406807219530703}
|
||||||
|
m_Father: {fileID: 5657737279223690836}
|
||||||
|
m_RootOrder: -1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: -0, y: 0.188}
|
||||||
|
m_SizeDelta: {x: 1224, y: 2048}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &7293572772725810188
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1758614216652057599}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &3429438874807908211
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1758614216652057599}
|
||||||
|
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: 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_Sprite: {fileID: 21300000, guid: 49dc94a1246ace944adb973076dd923f, type: 3}
|
||||||
|
m_Type: 0
|
||||||
|
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 &4663194936290788516
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 5657737279223690836}
|
||||||
|
- component: {fileID: 629815897227783454}
|
||||||
|
- component: {fileID: 584286906844083765}
|
||||||
|
- component: {fileID: 6105090838799004608}
|
||||||
|
- component: {fileID: 7699707098595015193}
|
||||||
|
- component: {fileID: 1653195237934660084}
|
||||||
|
- component: {fileID: 7980494176537648463}
|
||||||
|
- component: {fileID: 1413215456818694348}
|
||||||
|
- component: {fileID: 483845010817450077}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: ShapeDetectionNPC
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &5657737279223690836
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4663194936290788516}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 6822286665445551211}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: -1
|
||||||
|
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: 250, y: 250}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!223 &629815897227783454
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4663194936290788516}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_RenderMode: 2
|
||||||
|
m_Camera: {fileID: 0}
|
||||||
|
m_PlaneDistance: 100
|
||||||
|
m_PixelPerfect: 0
|
||||||
|
m_ReceivesEvents: 1
|
||||||
|
m_OverrideSorting: 0
|
||||||
|
m_OverridePixelPerfect: 0
|
||||||
|
m_SortingBucketNormalizedSize: 0
|
||||||
|
m_AdditionalShaderChannelsFlag: 25
|
||||||
|
m_UpdateRectTransformForStandalone: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!114 &584286906844083765
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4663194936290788516}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, 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
|
||||||
|
m_PresetInfoIsWorld: 0
|
||||||
|
--- !u!114 &6105090838799004608
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4663194936290788516}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
--- !u!114 &7699707098595015193
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4663194936290788516}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 6c6205a218222364ca440c740b7a6b8f, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
SelectAudio:
|
||||||
|
Guid:
|
||||||
|
Data1: -324096350
|
||||||
|
Data2: 1099316438
|
||||||
|
Data3: -1292984414
|
||||||
|
Data4: -378837710
|
||||||
|
Path: event:/Voiceovers/Voicelines_DeltaVR
|
||||||
|
SoundOcclusionWidening: 1
|
||||||
|
PlayerOcclusionWidening: 1
|
||||||
|
OcclusionLayer:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
--- !u!114 &1653195237934660084
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4663194936290788516}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: c5280c89a923c584db07cbc2e946f33e, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
mouth: {fileID: 5759406807219530703}
|
||||||
|
turnSpeed: 5
|
||||||
|
voicelinesFolder: CharacterVoicelines
|
||||||
|
characterSpecificFolder: Professor
|
||||||
|
voiceLineKeys: []
|
||||||
|
minScaleY: 0.3
|
||||||
|
maxScaleY: 1
|
||||||
|
gain: 30
|
||||||
|
attack: 0.6
|
||||||
|
release: 0.2
|
||||||
|
inverted: 0
|
||||||
|
fmodWhisperBridge: {fileID: 0}
|
||||||
|
ignorePlayerCollisionLayer: 2
|
||||||
|
--- !u!65 &7980494176537648463
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4663194936290788516}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 1
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 5, y: 1, z: 5}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &1413215456818694348
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4663194936290788516}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
<IsNested>k__BackingField: 0
|
||||||
|
<ComponentIndex>k__BackingField: 0
|
||||||
|
<PredictedSpawn>k__BackingField: {fileID: 0}
|
||||||
|
_networkBehaviours:
|
||||||
|
- {fileID: 483845010817450077}
|
||||||
|
<ParentNetworkObject>k__BackingField: {fileID: 0}
|
||||||
|
<ChildNetworkObjects>k__BackingField: []
|
||||||
|
_isNetworked: 1
|
||||||
|
_isGlobal: 0
|
||||||
|
_initializeOrder: 0
|
||||||
|
_defaultDespawnType: 0
|
||||||
|
NetworkObserver: {fileID: 0}
|
||||||
|
<PrefabId>k__BackingField: 0
|
||||||
|
<SpawnableCollectionId>k__BackingField: 0
|
||||||
|
_scenePathHash: 0
|
||||||
|
<SceneId>k__BackingField: 0
|
||||||
|
<AssetPathHash>k__BackingField: 3349022803513005611
|
||||||
|
_sceneNetworkObjects:
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 1413215456818694348}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
- {fileID: 0}
|
||||||
|
--- !u!114 &483845010817450077
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4663194936290788516}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a2836e36774ca1c4bbbee976e17b649c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
_componentIndexCache: 0
|
||||||
|
_addedNetworkObject: {fileID: 1413215456818694348}
|
||||||
|
_networkObjectCache: {fileID: 1413215456818694348}
|
||||||
|
_synchronizeParent: 0
|
||||||
|
_packing:
|
||||||
|
Position: 1
|
||||||
|
Rotation: 1
|
||||||
|
Scale: 0
|
||||||
|
_interpolation: 2
|
||||||
|
_extrapolation: 2
|
||||||
|
_enableTeleport: 0
|
||||||
|
_teleportThreshold: 1
|
||||||
|
_clientAuthoritative: 1
|
||||||
|
_sendToOwner: 1
|
||||||
|
_synchronizePosition: 1
|
||||||
|
_positionSnapping:
|
||||||
|
X: 0
|
||||||
|
Y: 0
|
||||||
|
Z: 0
|
||||||
|
_synchronizeRotation: 1
|
||||||
|
_rotationSnapping:
|
||||||
|
X: 0
|
||||||
|
Y: 0
|
||||||
|
Z: 0
|
||||||
|
_synchronizeScale: 1
|
||||||
|
_scaleSnapping:
|
||||||
|
X: 0
|
||||||
|
Y: 0
|
||||||
|
Z: 0
|
||||||
|
--- !u!1 &7802421088258943189
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 5759406807219530703}
|
||||||
|
- component: {fileID: 7165916293981694318}
|
||||||
|
- component: {fileID: 6022352331462232051}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Mouth
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &5759406807219530703
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7802421088258943189}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 3, y: 3, z: 3}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6822286665445551211}
|
||||||
|
m_RootOrder: -1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: -2.9, y: 257.4}
|
||||||
|
m_SizeDelta: {x: 100, y: 100}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &7165916293981694318
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7802421088258943189}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &6022352331462232051
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7802421088258943189}
|
||||||
|
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: 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_Sprite: {fileID: 21300000, guid: d6cb08bc045869645a782eb599897dbb, type: 3}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 29e0a8d8a218cc14c8b9603d08d0d391
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
@@ -1,10 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class ShapeDetectionMinigameController : MonoBehaviour
|
public class ShapeDetectionNPC : NPCController
|
||||||
{
|
{
|
||||||
|
[Header("Shape Detection Minigame Config")]
|
||||||
public MicrophoneStand microphoneStand;
|
public MicrophoneStand microphoneStand;
|
||||||
|
public RadioTransmitter radio;
|
||||||
public PushableButton imageGenerationButton;
|
public PushableButton imageGenerationButton;
|
||||||
public PushableButton modelGenerationButton;
|
public PushableButton modelGenerationButton;
|
||||||
public Texture2D GeneratedTexture { get; private set; }
|
public Texture2D GeneratedTexture { get; private set; }
|
||||||
@@ -15,24 +18,97 @@ public class ShapeDetectionMinigameController : MonoBehaviour
|
|||||||
public string shapeScannerTag = "ShapeScannable";
|
public string shapeScannerTag = "ShapeScannable";
|
||||||
public int ignorePlayerCollisionLayer = 2;
|
public int ignorePlayerCollisionLayer = 2;
|
||||||
|
|
||||||
private bool modelGenerationInProgress;
|
// states:
|
||||||
|
// 0 - idle
|
||||||
|
// 1 - noticed player
|
||||||
|
// 2 - player picked up radio
|
||||||
|
// 3 - player spoke into the radio
|
||||||
|
// 4 - player pressed enter on keyboard
|
||||||
|
// 5 - player inserted picture into printer
|
||||||
|
// 6 - finished speaking
|
||||||
|
private int state;
|
||||||
|
private float lastPlayerApproachTime;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
private void Awake()
|
||||||
void Start()
|
|
||||||
{
|
{
|
||||||
imageGenerationButton.OnButtonPressed += InvokeImageGeneration;
|
state = 0;
|
||||||
modelGenerationButton.OnButtonPressed += InvokeModelGeneration;
|
lastPlayerApproachTime = Time.time;
|
||||||
modelGenerationInProgress = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
private void Start()
|
||||||
void Update()
|
|
||||||
{
|
{
|
||||||
|
radio.OnPlayerPickUp += OnPlayerPickedUpRadio;
|
||||||
|
microphoneStand.OnPlayerFinishedSpeaking += OnPlayerUsedMicrophone;
|
||||||
|
imageGenerationButton.OnButtonPressed += OnPlayerPressedKeyboard;
|
||||||
|
modelGenerationButton.OnButtonPressed += OnPlayerInitiatedPrinting;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void InvokeImageGeneration()
|
protected async override void OnPlayerApproach()
|
||||||
{
|
{
|
||||||
|
if (Time.time < lastPlayerApproachTime + 0.5f)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
lastPlayerApproachTime = Time.time;
|
||||||
|
|
||||||
|
if (state == 0)
|
||||||
|
{
|
||||||
|
state = 1;
|
||||||
|
await CallPlayer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPlayerLeave()
|
||||||
|
{
|
||||||
|
if (Time.time < lastPlayerApproachTime + 0.5f)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state == 1)
|
||||||
|
{
|
||||||
|
state = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task CallPlayer()
|
||||||
|
{
|
||||||
|
if (state == 1)
|
||||||
|
{
|
||||||
|
SpeakVoiceLine(0);
|
||||||
|
await Task.Delay(2000);
|
||||||
|
SpeakVoiceLine(1);
|
||||||
|
Invoke(nameof(CallPlayer), 4f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnPlayerPickedUpRadio()
|
||||||
|
{
|
||||||
|
if (state == 1)
|
||||||
|
{
|
||||||
|
SpeakVoiceLine(2);
|
||||||
|
state = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: replace microphone with radio
|
||||||
|
private void OnPlayerUsedMicrophone()
|
||||||
|
{
|
||||||
|
if (state == 2)
|
||||||
|
{
|
||||||
|
SpeakVoiceLine(3);
|
||||||
|
state = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void OnPlayerPressedKeyboard()
|
||||||
|
{
|
||||||
|
if (state == 3)
|
||||||
|
{
|
||||||
|
SpeakVoiceLine(4);
|
||||||
|
state = 4;
|
||||||
|
}
|
||||||
|
|
||||||
string inputPrompt = microphoneStand.GetTextOutput();
|
string inputPrompt = microphoneStand.GetTextOutput();
|
||||||
byte[] imageBytes = await InvokeAiClient.Instance.GenerateImage(inputPrompt);
|
byte[] imageBytes = await InvokeAiClient.Instance.GenerateImage(inputPrompt);
|
||||||
GeneratedTexture = ModelGenerationUtils.CreateTexture(imageBytes);
|
GeneratedTexture = ModelGenerationUtils.CreateTexture(imageBytes);
|
||||||
@@ -40,15 +116,20 @@ public class ShapeDetectionMinigameController : MonoBehaviour
|
|||||||
imageDisplay.sprite = sprite;
|
imageDisplay.sprite = sprite;
|
||||||
|
|
||||||
imageGenerationButton.Deactivate();
|
imageGenerationButton.Deactivate();
|
||||||
if (!modelGenerationInProgress)
|
if (state == 4)
|
||||||
{
|
{
|
||||||
modelGenerationButton.Deactivate();
|
modelGenerationButton.Deactivate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void InvokeModelGeneration()
|
private async void OnPlayerInitiatedPrinting()
|
||||||
{
|
{
|
||||||
modelGenerationInProgress = true;
|
if (state == 4)
|
||||||
|
{
|
||||||
|
SpeakVoiceLine(5);
|
||||||
|
state = 5;
|
||||||
|
}
|
||||||
|
|
||||||
string encodedTexture = Convert.ToBase64String(GeneratedTexture.EncodeToJPG());
|
string encodedTexture = Convert.ToBase64String(GeneratedTexture.EncodeToJPG());
|
||||||
byte[] encodedModel = await TrellisClient.Instance.GenerateModel(encodedTexture);
|
byte[] encodedModel = await TrellisClient.Instance.GenerateModel(encodedTexture);
|
||||||
|
|
||||||
@@ -59,12 +140,14 @@ public class ShapeDetectionMinigameController : MonoBehaviour
|
|||||||
{
|
{
|
||||||
// Destroy previous generated object (first move out of ShapeScanner to trigger OnTriggerExit
|
// Destroy previous generated object (first move out of ShapeScanner to trigger OnTriggerExit
|
||||||
GeneratedModel.transform.position = Vector3.zero;
|
GeneratedModel.transform.position = Vector3.zero;
|
||||||
//Destroy(GeneratedModel);
|
|
||||||
}
|
}
|
||||||
GeneratedModel = spawnedObject;
|
GeneratedModel = spawnedObject;
|
||||||
|
|
||||||
modelGenerationButton.Deactivate();
|
modelGenerationButton.Deactivate();
|
||||||
modelGenerationInProgress = false;
|
|
||||||
|
if (state == 5)
|
||||||
|
{
|
||||||
|
state = 6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeSpawnedObject(GameObject spawnedObject)
|
private void InitializeSpawnedObject(GameObject spawnedObject)
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 7000d3fd17422c74e9f86757bc8529f0
|
guid: c5280c89a923c584db07cbc2e946f33e
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.XR.Interaction.Toolkit;
|
||||||
|
|
||||||
|
public class RadioTransmitter : XRGrabInteractable
|
||||||
|
{
|
||||||
|
public delegate void OnPlayerPickUpDelegate();
|
||||||
|
public event OnPlayerPickUpDelegate OnPlayerPickUp;
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnSelectEntered(SelectEnterEventArgs args)
|
||||||
|
{
|
||||||
|
base.OnSelectEntered(args);
|
||||||
|
OnPlayerPickUp?.Invoke();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d5f509001c54a4e4794e50075eb0e214
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Reference in New Issue
Block a user