Fix wheel + added sound trigger

This commit is contained in:
r.nikolin 2023-10-23 12:07:14 +03:00
parent 4c93163d74
commit ba0261c699
9 changed files with 918 additions and 847 deletions

View File

@ -197,6 +197,15 @@ namespace BNG {
}
}
public GameObject Sockets;
public void DisableWheel()
{
grab.ForceRelease();
Sockets.SetActive(false);
grab.enabled = false;
}
public virtual void CallEvents() {
// Call events
if (targetAngle != previousTargetAngle) {

View File

@ -745,6 +745,13 @@ AnimationClip:
m_HasGenericRootTransform: 1
m_HasMotionFloatCurves: 0
m_Events:
- time: 2.7166667
functionName: PlaySound
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
- time: 15
functionName: StopCutscene
data:

View File

@ -27172,6 +27172,11 @@ PrefabInstance:
propertyPath: m_Name
value: Player
objectReference: {fileID: 0}
- target: {fileID: 4574774226685425247, guid: 4261da25920e00f41b87a4410b9d42eb,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4574774226773336104, guid: 4261da25920e00f41b87a4410b9d42eb,
type: 3}
propertyPath: OnActivate.m_PersistentCalls.m_Calls.Array.data[0].m_Target
@ -27247,16 +27252,16 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c617f004954f37d4e91211c364270d3d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &7192482667834520397 stripped
--- !u!114 &7192482667834520399 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4574774226773336105, guid: 4261da25920e00f41b87a4410b9d42eb,
m_CorrespondingSourceObject: {fileID: 4574774226773336107, guid: 4261da25920e00f41b87a4410b9d42eb,
type: 3}
m_PrefabInstance: {fileID: 6677721189999301476}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5cdea428d48e2bb488d33d5f75c39bb9, type: 3}
m_Script: {fileID: 11500000, guid: fcd4e1c27cf052240863dd47c27c83d4, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &7192482668302541528 stripped
@ -28208,7 +28213,7 @@ PrefabInstance:
type: 3}
propertyPath: _wheel
value:
objectReference: {fileID: 7192482667834520397}
objectReference: {fileID: 7192482667834520399}
- target: {fileID: 7764968720947879535, guid: f4b26a7999d583848bd57077f2a92c42,
type: 3}
propertyPath: TextShow

File diff suppressed because it is too large Load Diff

View File

@ -126,8 +126,8 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 559184590678905903}
m_LocalRotation: {x: 0.2558619, y: -0.000000016915408, z: 0.0000000071570967, w: 0.9667134}
m_LocalPosition: {x: 0, y: 0, z: -0.1041}
m_LocalRotation: {x: 0.2558619, y: -0.000000024317567, z: 0.000000008036549, w: 0.9667133}
m_LocalPosition: {x: 0, y: 0, z: -0.104100004}
m_LocalScale: {x: 0.00082322006, y: 0.0008232201, z: 0.0008232201}
m_ConstrainProportionsScale: 0
m_Children:
@ -136,12 +136,12 @@ RectTransform:
- {fileID: 5885267486651285723}
- {fileID: 5885267485284967485}
- {fileID: 5885267486677057173}
m_Father: {fileID: 4574774226259269087}
m_RootOrder: 1
m_Father: {fileID: 4574774226685425246}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 29.649, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -0, y: -0.0142}
m_AnchoredPosition: {x: 0, y: -0.0142}
m_SizeDelta: {x: 400, y: 400}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &559184590678905876
@ -353,7 +353,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4574774226259269087}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4218079234329128429
MeshFilter:
@ -1172,7 +1172,6 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4574774227166663157}
- {fileID: 559184590678905902}
- {fileID: 3228900253418438670}
- {fileID: 7982517269591815011}
- {fileID: 4574774226758547681}
@ -1590,8 +1589,8 @@ MonoBehaviour:
m_Calls: []
m_text: 1
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f1a5c40efb742148a6ca631bfb0370c, type: 2}
m_sharedMaterial: {fileID: -3177006314834095750, guid: 3f1a5c40efb742148a6ca631bfb0370c,
m_fontAsset: {fileID: 11400000, guid: 7447f36ff31ab074cbf32aa89b30e657, type: 2}
m_sharedMaterial: {fileID: -8059771618434923769, guid: 7447f36ff31ab074cbf32aa89b30e657,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
@ -1622,7 +1621,7 @@ MonoBehaviour:
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_fontStyle: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
@ -1899,8 +1898,9 @@ Transform:
m_Children:
- {fileID: 4574774227240815617}
- {fileID: 4574774227266246448}
- {fileID: 559184590678905902}
m_Father: {fileID: 4574774226259269087}
m_RootOrder: 5
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &4574774226720297487
GameObject:
@ -2021,7 +2021,7 @@ Transform:
m_Children:
- {fileID: 4104579808909084031}
m_Father: {fileID: 4574774226259269087}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!1 &4574774226773336103
GameObject:
@ -2286,6 +2286,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls: []
ShowEditorGizmos: 1
Sockets: {fileID: 4574774226685425247}
--- !u!114 &4574774226773336104
MonoBehaviour:
m_ObjectHideFlags: 0
@ -3273,7 +3274,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4574774226259269087}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6918732540420252182
MeshFilter:
@ -5582,8 +5583,8 @@ MonoBehaviour:
m_Calls: []
m_text: 00:00 000
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f1a5c40efb742148a6ca631bfb0370c, type: 2}
m_sharedMaterial: {fileID: -3177006314834095750, guid: 3f1a5c40efb742148a6ca631bfb0370c,
m_fontAsset: {fileID: 11400000, guid: 7447f36ff31ab074cbf32aa89b30e657, type: 2}
m_sharedMaterial: {fileID: -8059771618434923769, guid: 7447f36ff31ab074cbf32aa89b30e657,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
@ -6226,7 +6227,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.17254902, g: 0.30980393, b: 0.38431373, a: 1}
m_Color: {r: 0.43137258, g: 0.74509805, b: 0.9921569, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
@ -10342,16 +10343,16 @@ MonoBehaviour:
m_Calls: []
m_text: "\u043A\u043C/\u0447"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f1a5c40efb742148a6ca631bfb0370c, type: 2}
m_sharedMaterial: {fileID: -3177006314834095750, guid: 3f1a5c40efb742148a6ca631bfb0370c,
m_fontAsset: {fileID: 11400000, guid: 7447f36ff31ab074cbf32aa89b30e657, type: 2}
m_sharedMaterial: {fileID: -8059771618434923769, guid: 7447f36ff31ab074cbf32aa89b30e657,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4284632876
m_fontColor: {r: 0.17254902, g: 0.30980393, b: 0.38431376, a: 1}
rgba: 4294950765
m_fontColor: {r: 0.4292453, g: 0.7485307, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
@ -10374,7 +10375,7 @@ MonoBehaviour:
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_fontStyle: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
@ -10524,16 +10525,16 @@ MonoBehaviour:
m_Calls: []
m_text: "\u0422\u0430\u0439\u043C\u0435\u0440"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f1a5c40efb742148a6ca631bfb0370c, type: 2}
m_sharedMaterial: {fileID: -3177006314834095750, guid: 3f1a5c40efb742148a6ca631bfb0370c,
m_fontAsset: {fileID: 11400000, guid: 7447f36ff31ab074cbf32aa89b30e657, type: 2}
m_sharedMaterial: {fileID: -8059771618434923769, guid: 7447f36ff31ab074cbf32aa89b30e657,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4284632876
m_fontColor: {r: 0.17254902, g: 0.30980393, b: 0.38431373, a: 1}
rgba: 4294950765
m_fontColor: {r: 0.4292453, g: 0.7485307, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
@ -10556,7 +10557,7 @@ MonoBehaviour:
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_fontStyle: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535

File diff suppressed because one or more lines are too long

View File

@ -23,4 +23,9 @@ public class CutsceneLookAt : MonoBehaviour
{
_gameModule.ShowEndMenu(true);
}
public void PlaySound()
{
FindObjectOfType<MonumentController>().PlaySound();
}
}

View File

@ -9,7 +9,7 @@ public class FinishController : MonoBehaviour
private ShipMoveSides _moveSides;
private MonumentController _monumentController;
private vTimerCounter _vTimerCounter;
[SerializeField] private Grabbable _wheel;
[SerializeField] private SteeringWheel _wheel;
private void Awake()
{
@ -26,8 +26,7 @@ public class FinishController : MonoBehaviour
private void DisablePlayerMovement()
{
_wheel.ForceRelease();
_wheel.gameObject.SetActive(false);
_wheel.DisableWheel();
_vTimerCounter.StopTimer();
_moveSides.ToggleInput(false);
}

View File

@ -40,12 +40,17 @@ public class MonumentController : MonoBehaviour
Debug.Log($"Clamped energy value: {_currentEnergy / _energyToUnlock}");
});
_previewSound.PlaySound(_info.LongClip);
_scoreController.AddScoreInTime(_info.Score, 1, false);
//TODO: ÐÀÇÁËÎÊÈÐÎÂÀÒÜ ÌÎÍÓÌÅÍÒ ÒÎËÜÊÎ ÅÑËÈ ÕÂÀÒÈËÎ ÝÍÅÐÃÈÈ
PlayerSetup.Instance.UnlockMonument(_info);
}
public void PlaySound()
{
_previewSound.PlaySound(_info.LongClip);
}
public void ShowPreview()
{
_cockpitUI.ShowInfo(_info.Image, _info.Description);