Compare commits
9 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
c115b776b5 | 2 weeks ago |
|
|
619e8cc4be | 2 weeks ago |
|
|
c616ea64f4 | 2 weeks ago |
|
|
4644a73ea0 | 2 weeks ago |
|
|
2444c99ccd | 3 weeks ago |
|
|
63a8ee9a7e | 3 weeks ago |
|
|
7e91ad4731 | 3 weeks ago |
|
|
99fb779515 | 3 weeks ago |
|
|
30f8e83a6a | 3 weeks ago |
33 changed files with 12480 additions and 106 deletions
@ -0,0 +1,6 @@ |
||||
{ |
||||
"version": "1.0", |
||||
"components": [ |
||||
"Microsoft.VisualStudio.Workload.ManagedGame" |
||||
] |
||||
} |
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,8 @@ |
||||
fileFormatVersion: 2 |
||||
guid: 1d53ddfb65851cf4dbfc4a82d2922728 |
||||
NativeFormatImporter: |
||||
externalObjects: {} |
||||
mainObjectFileID: 11400000 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
Binary file not shown.
@ -0,0 +1,21 @@ |
||||
fileFormatVersion: 2 |
||||
guid: b83a75b4d73f9744bbe92ddde8f63a7d |
||||
TrueTypeFontImporter: |
||||
externalObjects: {} |
||||
serializedVersion: 4 |
||||
fontSize: 16 |
||||
forceTextureCase: -2 |
||||
characterSpacing: 0 |
||||
characterPadding: 1 |
||||
includeFontData: 1 |
||||
fontNames: |
||||
- FOT-UDKakugoC80 Pro |
||||
fallbackFontReferences: [] |
||||
customCharacters: |
||||
fontRenderingMode: 0 |
||||
ascentCalculationMode: 1 |
||||
useLegacyBoundsCalculation: 0 |
||||
shouldRoundAdvanceValue: 1 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
|
After Width: | Height: | Size: 1.1 MiB |
@ -0,0 +1,114 @@ |
||||
fileFormatVersion: 2 |
||||
guid: f1e3bdbdd173a1d4897aecd4ee95cc56 |
||||
TextureImporter: |
||||
internalIDToNameTable: [] |
||||
externalObjects: {} |
||||
serializedVersion: 13 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 0 |
||||
sRGBTexture: 1 |
||||
linearTexture: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapsPreserveCoverage: 0 |
||||
alphaTestReferenceValue: 0.5 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: 0.25 |
||||
normalMapFilter: 0 |
||||
flipGreenChannel: 0 |
||||
isReadable: 0 |
||||
streamingMipmaps: 0 |
||||
streamingMipmapsPriority: 0 |
||||
vTOnly: 0 |
||||
ignoreMipmapLimit: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 6 |
||||
cubemapConvolution: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: 1 |
||||
maxTextureSize: 2048 |
||||
textureSettings: |
||||
serializedVersion: 2 |
||||
filterMode: 1 |
||||
aniso: 1 |
||||
mipBias: 0 |
||||
wrapU: 1 |
||||
wrapV: 1 |
||||
wrapW: 1 |
||||
nPOTScale: 0 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 1 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: 0.5, y: 0.5} |
||||
spritePixelsToUnits: 100 |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spriteGenerateFallbackPhysicsShape: 1 |
||||
alphaUsage: 1 |
||||
alphaIsTransparency: 1 |
||||
spriteTessellationDetail: -1 |
||||
textureType: 8 |
||||
textureShape: 1 |
||||
singleChannelComponent: 0 |
||||
flipbookRows: 1 |
||||
flipbookColumns: 1 |
||||
maxTextureSizeSet: 0 |
||||
compressionQualitySet: 0 |
||||
textureFormatSet: 0 |
||||
ignorePngGamma: 0 |
||||
applyGammaDecoding: 0 |
||||
swizzle: 50462976 |
||||
cookieLightType: 0 |
||||
platformSettings: |
||||
- serializedVersion: 3 |
||||
buildTarget: DefaultTexturePlatform |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
ignorePlatformSupport: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
||||
- serializedVersion: 3 |
||||
buildTarget: Standalone |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
ignorePlatformSupport: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
||||
spriteSheet: |
||||
serializedVersion: 2 |
||||
sprites: [] |
||||
outline: [] |
||||
physicsShape: [] |
||||
bones: [] |
||||
spriteID: 5e97eb03825dee720800000000000000 |
||||
internalID: 0 |
||||
vertices: [] |
||||
indices: |
||||
edges: [] |
||||
weights: [] |
||||
secondaryTextures: [] |
||||
nameFileIdTable: {} |
||||
mipmapLimitGroupName: |
||||
pSDRemoveMatte: 0 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
|
After Width: | Height: | Size: 3.1 MiB |
@ -0,0 +1,114 @@ |
||||
fileFormatVersion: 2 |
||||
guid: 90ad5726d91685f409926f9a6bb7ccd7 |
||||
TextureImporter: |
||||
internalIDToNameTable: [] |
||||
externalObjects: {} |
||||
serializedVersion: 13 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 0 |
||||
sRGBTexture: 1 |
||||
linearTexture: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapsPreserveCoverage: 0 |
||||
alphaTestReferenceValue: 0.5 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: 0.25 |
||||
normalMapFilter: 0 |
||||
flipGreenChannel: 0 |
||||
isReadable: 0 |
||||
streamingMipmaps: 0 |
||||
streamingMipmapsPriority: 0 |
||||
vTOnly: 0 |
||||
ignoreMipmapLimit: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 6 |
||||
cubemapConvolution: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: 1 |
||||
maxTextureSize: 2048 |
||||
textureSettings: |
||||
serializedVersion: 2 |
||||
filterMode: 1 |
||||
aniso: 1 |
||||
mipBias: 0 |
||||
wrapU: 1 |
||||
wrapV: 1 |
||||
wrapW: 1 |
||||
nPOTScale: 0 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 1 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: 0.5, y: 0.5} |
||||
spritePixelsToUnits: 100 |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spriteGenerateFallbackPhysicsShape: 1 |
||||
alphaUsage: 1 |
||||
alphaIsTransparency: 1 |
||||
spriteTessellationDetail: -1 |
||||
textureType: 8 |
||||
textureShape: 1 |
||||
singleChannelComponent: 0 |
||||
flipbookRows: 1 |
||||
flipbookColumns: 1 |
||||
maxTextureSizeSet: 0 |
||||
compressionQualitySet: 0 |
||||
textureFormatSet: 0 |
||||
ignorePngGamma: 0 |
||||
applyGammaDecoding: 0 |
||||
swizzle: 50462976 |
||||
cookieLightType: 0 |
||||
platformSettings: |
||||
- serializedVersion: 3 |
||||
buildTarget: DefaultTexturePlatform |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
ignorePlatformSupport: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
||||
- serializedVersion: 3 |
||||
buildTarget: Standalone |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
ignorePlatformSupport: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
||||
spriteSheet: |
||||
serializedVersion: 2 |
||||
sprites: [] |
||||
outline: [] |
||||
physicsShape: [] |
||||
bones: [] |
||||
spriteID: 5e97eb03825dee720800000000000000 |
||||
internalID: 0 |
||||
vertices: [] |
||||
indices: |
||||
edges: [] |
||||
weights: [] |
||||
secondaryTextures: [] |
||||
nameFileIdTable: {} |
||||
mipmapLimitGroupName: |
||||
pSDRemoveMatte: 0 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@ |
||||
fileFormatVersion: 2 |
||||
guid: bac84382a290ed04eb82c435dcb6cdbf |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
@ -0,0 +1,408 @@ |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
using UnityEngine.UI; |
||||
using UnityEngine.Video; |
||||
using OscJack; |
||||
using TMPro; |
||||
|
||||
|
||||
public class MotyOscHandler : MonoBehaviour |
||||
{ |
||||
|
||||
[SerializeField] |
||||
public CanvasGroup standby; |
||||
|
||||
[SerializeField] |
||||
public CanvasGroup ending; |
||||
|
||||
[SerializeField] |
||||
public CanvasGroup ad; |
||||
|
||||
[SerializeField] |
||||
public CanvasGroup main; |
||||
|
||||
[SerializeField] |
||||
public VideoPlayer videoStandby; |
||||
|
||||
|
||||
[SerializeField] |
||||
public VideoPlayer videoIntro; |
||||
|
||||
|
||||
[SerializeField] |
||||
public VideoPlayer videoEnding; |
||||
|
||||
[SerializeField] |
||||
public VideoPlayer videoAd; |
||||
|
||||
|
||||
[SerializeField] |
||||
public Image mask; |
||||
|
||||
[SerializeField] |
||||
public float _fadeDuration = 1f; |
||||
|
||||
[SerializeField] |
||||
public float _hintDuration = 0.5f; |
||||
|
||||
[SerializeField] |
||||
public float _maskDuration = 0.2f; |
||||
[SerializeField] |
||||
public float _lastDurationToShow = 30f; |
||||
|
||||
[SerializeField] |
||||
public TextMeshProUGUI statusText; |
||||
|
||||
[SerializeField] |
||||
public CanvasGroup hint; |
||||
|
||||
private IEnumerator coroutine_hint; |
||||
private IEnumerator coroutine_countdown; |
||||
|
||||
SetChoiceEffect setChoiceEffect; |
||||
|
||||
[SerializeField] |
||||
public TextMeshProUGUI stepText; |
||||
|
||||
[SerializeField] |
||||
public CanvasGroup hintforChat; |
||||
[SerializeField] |
||||
public CanvasGroup hintforStep; |
||||
|
||||
private IEnumerator coroutine_breath; |
||||
|
||||
public CanvasGroup hintforInput; |
||||
|
||||
|
||||
// Start is called before the first frame update |
||||
void Start() |
||||
{ |
||||
setChoiceEffect = main?.GetComponent<SetChoiceEffect>(); |
||||
} |
||||
|
||||
// Update is called once per frame |
||||
void Update() |
||||
{ |
||||
|
||||
} |
||||
|
||||
|
||||
private IEnumerator FadeCanvasGroup(CanvasGroup canvasGroup, float startAlpha, float endAlpha, float duration, float delay = 0f) |
||||
{ |
||||
if (delay > 0f) |
||||
yield return new WaitForSeconds(delay); |
||||
|
||||
canvasGroup.alpha = startAlpha; |
||||
float elapsedTime = 0f; |
||||
|
||||
while (elapsedTime < duration) |
||||
{ |
||||
elapsedTime += Time.deltaTime; |
||||
canvasGroup.alpha = Mathf.Lerp(startAlpha, endAlpha, elapsedTime / duration); |
||||
yield return null; |
||||
} |
||||
|
||||
canvasGroup.alpha = endAlpha; |
||||
} |
||||
|
||||
private IEnumerator DecreaseFill(float duration) |
||||
{ |
||||
float elapsed = 0f; |
||||
mask.fillAmount = 1f; |
||||
|
||||
while (elapsed < duration) |
||||
{ |
||||
elapsed += Time.deltaTime; |
||||
|
||||
if (duration - elapsed > _lastDurationToShow) |
||||
{ |
||||
mask.fillAmount = 0; |
||||
mask.gameObject.SetActive(false); |
||||
} |
||||
else |
||||
{ |
||||
mask.gameObject.SetActive(true); |
||||
mask.fillAmount = Mathf.Lerp(0f, 1f, (duration - elapsed) / _lastDurationToShow); |
||||
} |
||||
yield return null; |
||||
} |
||||
|
||||
mask.fillAmount = 0f; |
||||
} |
||||
|
||||
public void ToggleVideo(string status) |
||||
{ |
||||
switch(status) |
||||
{ |
||||
case "intro": |
||||
videoStandby.gameObject.SetActive(false); |
||||
videoEnding.gameObject.SetActive(false); |
||||
|
||||
videoIntro.time = 0f; |
||||
videoIntro.Play(); |
||||
if (standby.alpha > 0f) StartCoroutine(FadeCanvasGroup(standby, standby.alpha, 0f, _fadeDuration)); |
||||
if (main.alpha > 0f) StartCoroutine(FadeCanvasGroup(main, main.alpha, 0f, _fadeDuration)); |
||||
if (ad.alpha > 0f) StartCoroutine(FadeCanvasGroup(ad, ad.alpha, 0f, _fadeDuration)); |
||||
if (ending.alpha > 0f) StartCoroutine(FadeCanvasGroup(ending, ending.alpha, 0f, _fadeDuration)); |
||||
break; |
||||
case "end": |
||||
videoStandby.gameObject.SetActive(false); |
||||
videoEnding.gameObject.SetActive(true); |
||||
videoAd.gameObject.SetActive(false); |
||||
|
||||
videoEnding.time = 0f; |
||||
videoEnding.Play(); |
||||
|
||||
if (standby.alpha > 0f) StartCoroutine(FadeCanvasGroup(standby, standby.alpha, 0f, _fadeDuration)); |
||||
if (main.alpha > 0f) StartCoroutine(FadeCanvasGroup(main, main.alpha, 0f, _fadeDuration)); |
||||
if (ad.alpha > 0f) StartCoroutine(FadeCanvasGroup(ad, ad.alpha, 0f, _fadeDuration)); |
||||
if (ending.alpha < 1.0f) StartCoroutine(FadeCanvasGroup(ending, ending.alpha, 1f, _fadeDuration)); |
||||
|
||||
break; |
||||
case "standby": |
||||
case "reset": |
||||
videoStandby.gameObject.SetActive(true); |
||||
videoEnding.gameObject.SetActive(false); |
||||
videoAd.gameObject.SetActive(false); |
||||
|
||||
videoStandby.time = 0f; |
||||
videoStandby.Play(); |
||||
|
||||
if (standby.alpha < 1.0f) StartCoroutine(FadeCanvasGroup(standby, standby.alpha, 1f, _fadeDuration)); |
||||
if (main.alpha > 0f) StartCoroutine(FadeCanvasGroup(main, main.alpha, 0f, _fadeDuration)); |
||||
if (ad.alpha > 0f) StartCoroutine(FadeCanvasGroup(ad, ad.alpha, 0f, _fadeDuration)); |
||||
if (ending.alpha > 0f) StartCoroutine(FadeCanvasGroup(ending, ending.alpha, 0f, _fadeDuration)); |
||||
|
||||
break; |
||||
case "ad": |
||||
videoStandby.gameObject.SetActive(false); |
||||
videoEnding.gameObject.SetActive(false); |
||||
videoAd.gameObject.SetActive(true); |
||||
|
||||
videoAd.time = 0f; |
||||
videoAd.Play(); |
||||
|
||||
if (standby.alpha > 0f) StartCoroutine(FadeCanvasGroup(standby, standby.alpha, 0f, _fadeDuration)); |
||||
if (main.alpha > 0f) StartCoroutine(FadeCanvasGroup(main, main.alpha, 0f, _fadeDuration)); |
||||
if (ad.alpha < 1f) StartCoroutine(FadeCanvasGroup(ad, ad.alpha, 1f, _fadeDuration)); |
||||
if (ending.alpha > 0f) StartCoroutine(FadeCanvasGroup(ending, ending.alpha, 0f, _fadeDuration)); |
||||
|
||||
break; |
||||
} |
||||
} |
||||
|
||||
|
||||
public void onStatus(string status) |
||||
{ |
||||
Debug.Log("/status message received: " + status); |
||||
|
||||
ToggleVideo("reset"); |
||||
|
||||
if (coroutine_hint != null) StopCoroutine(coroutine_hint); |
||||
|
||||
mask.fillAmount = 0f; |
||||
|
||||
switch (status) |
||||
{ |
||||
case "reset": |
||||
// intro.alpha = 1.0f; |
||||
if (main.alpha > 0f) |
||||
StartCoroutine(FadeCanvasGroup(main, main.alpha, 0f, _fadeDuration)); |
||||
// if (intro.alpha < 1f) |
||||
// StartCoroutine(FadeCanvasGroup(intro, intro.alpha, 1f, _fadeDuration)); |
||||
|
||||
// light_mask.alpha = 0f; |
||||
hint.alpha = 0f; |
||||
// setChoiceEffect?.Reset(); |
||||
|
||||
ToggleVideo("standby"); |
||||
|
||||
break; |
||||
case "intro": |
||||
// StartCoroutine(FadeCanvasGroup(light_mask, 0f, 1f, _maskDuration)); |
||||
// StartCoroutine(FadeCanvasGroup(intro, 0f, 1f, _fadeDuration, _maskDuration)); |
||||
if (main.alpha > 0f) |
||||
StartCoroutine(FadeCanvasGroup(main, main.alpha, 0f, _fadeDuration)); |
||||
|
||||
StartCoroutine(FadeCanvasGroup(hint, hint.alpha, 1f, _hintDuration)); |
||||
ToggleVideo("intro"); |
||||
|
||||
break; |
||||
case "go": |
||||
|
||||
// if (light_mask.alpha < 1f) StartCoroutine(FadeCanvasGroup(light_mask, light_mask.alpha, 1f, _fadeDuration)); |
||||
// StartCoroutine(FadeCanvasGroup(intro, intro.alpha, 0f, _fadeDuration)); |
||||
StartCoroutine(FadeCanvasGroup(main, main.alpha, 1f, _fadeDuration)); |
||||
|
||||
break; |
||||
case "end": |
||||
// if (intro.alpha > 0f) StartCoroutine(FadeCanvasGroup(intro, 1f, 0f, _fadeDuration)); |
||||
// StartCoroutine(FadeCanvasGroup(main, 1f, 0f, _fadeDuration)); |
||||
main.alpha = 0f; |
||||
standby.alpha=0f; |
||||
|
||||
// StartCoroutine(FadeCanvasGroup(light_mask, 1f, 0f, _maskDuration, _fadeDuration)); |
||||
if (hint.alpha > 0f) |
||||
{ |
||||
coroutine_hint = FadeCanvasGroup(hint, hint.alpha, 0f, _hintDuration); |
||||
StartCoroutine(coroutine_hint); |
||||
} |
||||
|
||||
ToggleVideo("end"); |
||||
|
||||
break; |
||||
case "ad": |
||||
ToggleVideo("ad"); |
||||
break; |
||||
default: |
||||
Debug.LogWarning("Unknown status: " + status); |
||||
break; |
||||
} |
||||
|
||||
} |
||||
public void onCountDown(string time) |
||||
{ |
||||
Debug.Log("/countdown message received: " + time); |
||||
|
||||
if (mask != null) |
||||
{ |
||||
|
||||
if (coroutine_countdown != null) StopCoroutine(coroutine_countdown); |
||||
|
||||
if (time == "0") |
||||
{ |
||||
mask.fillAmount = 0f; |
||||
mask.gameObject.SetActive(false); |
||||
|
||||
} |
||||
else |
||||
{ |
||||
coroutine_countdown = DecreaseFill(float.Parse(time)); |
||||
StartCoroutine(coroutine_countdown); |
||||
} |
||||
} |
||||
|
||||
} |
||||
public void onSpeechPause(string pause) |
||||
{ |
||||
Debug.Log("/speechpause message received: " + pause); |
||||
float pause_time = float.Parse(pause); |
||||
if (pause_time > 0f) |
||||
{ |
||||
StartCoroutine(FadeCanvasGroup(hintforInput, hintforInput.alpha, 0f, pause_time/1000.0f)); |
||||
} |
||||
|
||||
} |
||||
public void onInput(string input) |
||||
{ |
||||
Debug.Log("/input message received: " + input); |
||||
|
||||
|
||||
|
||||
|
||||
if (input.Length == 0) |
||||
{ |
||||
statusText.text = ""; |
||||
// hintforChat.alpha = 0f; |
||||
if (hintforChat.alpha > 0f) |
||||
{ |
||||
StartCoroutine(FadeCanvasGroup(hintforChat, hintforChat.alpha, 0f, _hintDuration)); |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
hintforInput.alpha = 1.0f; |
||||
|
||||
if (hint.alpha < 1f) |
||||
{ |
||||
if (coroutine_hint != null) StopCoroutine(coroutine_hint); |
||||
coroutine_hint = FadeCanvasGroup(hint, hint.alpha, 1f, _hintDuration); |
||||
StartCoroutine(coroutine_hint); |
||||
} |
||||
|
||||
|
||||
// statusText.text = input; |
||||
StartCoroutine(TypeWriter(statusText, input)); |
||||
// hintforChat.alpha = 1f; |
||||
// if (hintforChat.alpha < 1f) |
||||
// { |
||||
StartCoroutine(FadeCanvasGroup(hintforChat, hintforChat.alpha, 1f, _hintDuration)); |
||||
|
||||
// } |
||||
|
||||
if (hint.alpha < 1f) |
||||
{ |
||||
// if (coroutine_hint != null) StopCoroutine(coroutine_hint); |
||||
// coroutine_hint = FadeCanvasGroup(hint, hint.alpha, 1f, _hintDuration); |
||||
// StartCoroutine(coroutine_hint); |
||||
|
||||
if (coroutine_hint != null) StopCoroutine(coroutine_hint); |
||||
coroutine_hint = BreathFade(hint); |
||||
StartCoroutine(coroutine_hint); |
||||
|
||||
} |
||||
} |
||||
|
||||
|
||||
} |
||||
public void onHint(string text) |
||||
{ |
||||
Debug.Log("/hint message received: " + text); |
||||
|
||||
// stepText.text = text; |
||||
StartCoroutine(TypeWriter(stepText, text)); |
||||
|
||||
StartCoroutine(FadeCanvasGroup(hintforStep, hintforStep.alpha, 1f, _hintDuration)); |
||||
|
||||
if (coroutine_breath != null) StopCoroutine(coroutine_breath); |
||||
// coroutine_hint = FadeCanvasGroup(hint, hint.alpha, text.Length > 0 ? 1f : 0f, _hintDuration); |
||||
// StartCoroutine(coroutine_hint); |
||||
|
||||
hintforInput.alpha = 1.0f; |
||||
|
||||
coroutine_breath = BreathFade(hintforStep); |
||||
StartCoroutine(coroutine_breath); |
||||
|
||||
|
||||
} |
||||
private IEnumerator BreathFade(CanvasGroup canvasGroup, float maxAlpha=1f, float minAlpha=0.5f, |
||||
float fadeInDuration=1.2f, float fadeOutDuration=1.2f, int cycles=20) |
||||
{ |
||||
for (int i = 0; i < cycles; i++) |
||||
{ |
||||
// Fade out |
||||
float elapsed = 0f; |
||||
while (elapsed < fadeOutDuration) |
||||
{ |
||||
elapsed += Time.deltaTime; |
||||
canvasGroup.alpha = Mathf.Lerp(maxAlpha, minAlpha, elapsed / fadeOutDuration); |
||||
yield return null; |
||||
} |
||||
canvasGroup.alpha = minAlpha; |
||||
|
||||
// Fade in |
||||
elapsed = 0f; |
||||
while (elapsed < fadeInDuration) |
||||
{ |
||||
elapsed += Time.deltaTime; |
||||
canvasGroup.alpha = Mathf.Lerp(minAlpha, maxAlpha, elapsed / fadeInDuration); |
||||
yield return null; |
||||
} |
||||
canvasGroup.alpha = maxAlpha; |
||||
} |
||||
} |
||||
public IEnumerator TypeWriter(TextMeshProUGUI textComponent, string message, float typeSpeed = 0.2f) |
||||
{ |
||||
|
||||
textComponent.text = ""; |
||||
foreach (char c in message) |
||||
{ |
||||
textComponent.text += c; |
||||
yield return new WaitForSeconds(typeSpeed); |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,11 @@ |
||||
fileFormatVersion: 2 |
||||
guid: 6900c568ad7dd3a4d93dc992baf8627f |
||||
MonoImporter: |
||||
externalObjects: {} |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
@ -0,0 +1,11 @@ |
||||
fileFormatVersion: 2 |
||||
guid: 671f8079c9c75074c94e282e8026d039 |
||||
MonoImporter: |
||||
externalObjects: {} |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,40 @@ |
||||
%YAML 1.1 |
||||
%TAG !u! tag:unity3d.com,2011: |
||||
--- !u!84 &8400000 |
||||
RenderTexture: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_Name: Moty DisplayTexture |
||||
m_ImageContentsHash: |
||||
serializedVersion: 2 |
||||
Hash: 00000000000000000000000000000000 |
||||
m_ForcedFallbackFormat: 4 |
||||
m_DownscaleFallback: 0 |
||||
m_IsAlphaChannelOptional: 0 |
||||
serializedVersion: 5 |
||||
m_Width: 1280 |
||||
m_Height: 720 |
||||
m_AntiAliasing: 8 |
||||
m_MipCount: -1 |
||||
m_DepthStencilFormat: 94 |
||||
m_ColorFormat: 8 |
||||
m_MipMap: 0 |
||||
m_GenerateMips: 1 |
||||
m_SRGB: 0 |
||||
m_UseDynamicScale: 0 |
||||
m_BindMS: 0 |
||||
m_EnableCompatibleFormat: 1 |
||||
m_EnableRandomWrite: 0 |
||||
m_TextureSettings: |
||||
serializedVersion: 2 |
||||
m_FilterMode: 1 |
||||
m_Aniso: 0 |
||||
m_MipBias: 0 |
||||
m_WrapU: 1 |
||||
m_WrapV: 1 |
||||
m_WrapW: 1 |
||||
m_Dimension: 2 |
||||
m_VolumeDepth: 1 |
||||
m_ShadowSamplingMode: 2 |
||||
@ -0,0 +1,8 @@ |
||||
fileFormatVersion: 2 |
||||
guid: 2df5ae5caa49d43468c4b8b2f9ca9a36 |
||||
NativeFormatImporter: |
||||
externalObjects: {} |
||||
mainObjectFileID: 8400000 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
@ -0,0 +1,40 @@ |
||||
%YAML 1.1 |
||||
%TAG !u! tag:unity3d.com,2011: |
||||
--- !u!84 &8400000 |
||||
RenderTexture: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_Name: Moty Video Texture Ad |
||||
m_ImageContentsHash: |
||||
serializedVersion: 2 |
||||
Hash: 00000000000000000000000000000000 |
||||
m_ForcedFallbackFormat: 4 |
||||
m_DownscaleFallback: 0 |
||||
m_IsAlphaChannelOptional: 0 |
||||
serializedVersion: 5 |
||||
m_Width: 1280 |
||||
m_Height: 720 |
||||
m_AntiAliasing: 8 |
||||
m_MipCount: -1 |
||||
m_DepthStencilFormat: 94 |
||||
m_ColorFormat: 8 |
||||
m_MipMap: 0 |
||||
m_GenerateMips: 1 |
||||
m_SRGB: 0 |
||||
m_UseDynamicScale: 0 |
||||
m_BindMS: 0 |
||||
m_EnableCompatibleFormat: 1 |
||||
m_EnableRandomWrite: 0 |
||||
m_TextureSettings: |
||||
serializedVersion: 2 |
||||
m_FilterMode: 1 |
||||
m_Aniso: 0 |
||||
m_MipBias: 0 |
||||
m_WrapU: 1 |
||||
m_WrapV: 1 |
||||
m_WrapW: 1 |
||||
m_Dimension: 2 |
||||
m_VolumeDepth: 1 |
||||
m_ShadowSamplingMode: 2 |
||||
@ -0,0 +1,8 @@ |
||||
fileFormatVersion: 2 |
||||
guid: c0eb51b67f8f8de4abfe463866648662 |
||||
NativeFormatImporter: |
||||
externalObjects: {} |
||||
mainObjectFileID: 8400000 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
@ -0,0 +1,40 @@ |
||||
%YAML 1.1 |
||||
%TAG !u! tag:unity3d.com,2011: |
||||
--- !u!84 &8400000 |
||||
RenderTexture: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_Name: Moty Video Texture BG |
||||
m_ImageContentsHash: |
||||
serializedVersion: 2 |
||||
Hash: 00000000000000000000000000000000 |
||||
m_ForcedFallbackFormat: 4 |
||||
m_DownscaleFallback: 0 |
||||
m_IsAlphaChannelOptional: 0 |
||||
serializedVersion: 5 |
||||
m_Width: 1280 |
||||
m_Height: 720 |
||||
m_AntiAliasing: 8 |
||||
m_MipCount: -1 |
||||
m_DepthStencilFormat: 94 |
||||
m_ColorFormat: 8 |
||||
m_MipMap: 0 |
||||
m_GenerateMips: 1 |
||||
m_SRGB: 0 |
||||
m_UseDynamicScale: 0 |
||||
m_BindMS: 0 |
||||
m_EnableCompatibleFormat: 1 |
||||
m_EnableRandomWrite: 0 |
||||
m_TextureSettings: |
||||
serializedVersion: 2 |
||||
m_FilterMode: 1 |
||||
m_Aniso: 0 |
||||
m_MipBias: 0 |
||||
m_WrapU: 1 |
||||
m_WrapV: 1 |
||||
m_WrapW: 1 |
||||
m_Dimension: 2 |
||||
m_VolumeDepth: 1 |
||||
m_ShadowSamplingMode: 2 |
||||
@ -0,0 +1,8 @@ |
||||
fileFormatVersion: 2 |
||||
guid: 2c98b173dd0fb3a4696ecffcbc66f94f |
||||
NativeFormatImporter: |
||||
externalObjects: {} |
||||
mainObjectFileID: 8400000 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
@ -0,0 +1,40 @@ |
||||
%YAML 1.1 |
||||
%TAG !u! tag:unity3d.com,2011: |
||||
--- !u!84 &8400000 |
||||
RenderTexture: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_Name: Moty Video Texture Ending |
||||
m_ImageContentsHash: |
||||
serializedVersion: 2 |
||||
Hash: 00000000000000000000000000000000 |
||||
m_ForcedFallbackFormat: 4 |
||||
m_DownscaleFallback: 0 |
||||
m_IsAlphaChannelOptional: 0 |
||||
serializedVersion: 5 |
||||
m_Width: 1280 |
||||
m_Height: 720 |
||||
m_AntiAliasing: 8 |
||||
m_MipCount: -1 |
||||
m_DepthStencilFormat: 94 |
||||
m_ColorFormat: 8 |
||||
m_MipMap: 0 |
||||
m_GenerateMips: 1 |
||||
m_SRGB: 0 |
||||
m_UseDynamicScale: 0 |
||||
m_BindMS: 0 |
||||
m_EnableCompatibleFormat: 1 |
||||
m_EnableRandomWrite: 0 |
||||
m_TextureSettings: |
||||
serializedVersion: 2 |
||||
m_FilterMode: 1 |
||||
m_Aniso: 0 |
||||
m_MipBias: 0 |
||||
m_WrapU: 1 |
||||
m_WrapV: 1 |
||||
m_WrapW: 1 |
||||
m_Dimension: 2 |
||||
m_VolumeDepth: 1 |
||||
m_ShadowSamplingMode: 2 |
||||
@ -0,0 +1,8 @@ |
||||
fileFormatVersion: 2 |
||||
guid: fac3a29942542a84083286b2d8b376dc |
||||
NativeFormatImporter: |
||||
externalObjects: {} |
||||
mainObjectFileID: 8400000 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
@ -0,0 +1,40 @@ |
||||
%YAML 1.1 |
||||
%TAG !u! tag:unity3d.com,2011: |
||||
--- !u!84 &8400000 |
||||
RenderTexture: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_Name: Moty Video Texture |
||||
m_ImageContentsHash: |
||||
serializedVersion: 2 |
||||
Hash: 00000000000000000000000000000000 |
||||
m_ForcedFallbackFormat: 4 |
||||
m_DownscaleFallback: 0 |
||||
m_IsAlphaChannelOptional: 0 |
||||
serializedVersion: 5 |
||||
m_Width: 1280 |
||||
m_Height: 720 |
||||
m_AntiAliasing: 8 |
||||
m_MipCount: -1 |
||||
m_DepthStencilFormat: 94 |
||||
m_ColorFormat: 8 |
||||
m_MipMap: 0 |
||||
m_GenerateMips: 1 |
||||
m_SRGB: 0 |
||||
m_UseDynamicScale: 0 |
||||
m_BindMS: 0 |
||||
m_EnableCompatibleFormat: 1 |
||||
m_EnableRandomWrite: 0 |
||||
m_TextureSettings: |
||||
serializedVersion: 2 |
||||
m_FilterMode: 1 |
||||
m_Aniso: 0 |
||||
m_MipBias: 0 |
||||
m_WrapU: 1 |
||||
m_WrapV: 1 |
||||
m_WrapW: 1 |
||||
m_Dimension: 2 |
||||
m_VolumeDepth: 1 |
||||
m_ShadowSamplingMode: 2 |
||||
@ -0,0 +1,8 @@ |
||||
fileFormatVersion: 2 |
||||
guid: 6c974968dd7933a4daab7dba5fd02dfd |
||||
NativeFormatImporter: |
||||
externalObjects: {} |
||||
mainObjectFileID: 8400000 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
||||
@ -1 +1 @@ |
||||
{"access_token":"ya29.a0AQQ_BDS2nYM6KNRSPy8ekvW2klxI4l3eOqVEEZgTcJyUvqQ-wja9VCNytq1Mny7pwhyrjpxuTHZ04Ug1ekdiXc4DtfV85vI00TfZoSzqpwnyzqHcDBVFrwF84Y_UNyGONmPzGM3eYz_tGDNmzAFWtW-FB60saWpUBDKN3Q53JOpF4BmIjhpnn2lBmJjlubQU1xF_GTeKDwaCgYKAckSARESFQHGX2Mi1q-NANLVrX2jjRDuQ8FD6A0209","token_type":"Bearer","expires_in":3599,"refresh_token":"1//0e-urCtqMVSK6CgYIARAAGA4SNwF-L9IrTWfNUsKFuBn8-mJmQxbXhkBlRW8776bD9xuFk1rFTaMH0dA9yRyESXHTchyXJDAJgkU","scope":"https://www.googleapis.com/auth/drive","Issued":"2025-10-17T12:21:26.480+08:00","IssuedUtc":"2025-10-17T04:21:26.480Z"} |
||||
{"access_token":"ya29.a0ATi6K2siNXd-9yVS2aNG4MRh8nsyICfP3YsEhF288MqLmnZIXPhbEDWHcB8hN8iRPh98egC7twftdKUayY3cwkYQM-fGK42wByjQJQrSVEnvZEK4tXrae6xl_QJpaJLWUVKl47EyTTQLSVYGKWpkQLm8jovWtMex1Ze1Lrgle-4Xm8NPvFX6qQM8Ha_iyCSHwFjrFEhkeQaCgYKASISARESFQHGX2Mit3WynDpQS7swnYO8m1loeg0209","token_type":"Bearer","expires_in":3599,"refresh_token":"1//0e-urCtqMVSK6CgYIARAAGA4SNwF-L9IrTWfNUsKFuBn8-mJmQxbXhkBlRW8776bD9xuFk1rFTaMH0dA9yRyESXHTchyXJDAJgkU","scope":"https://www.googleapis.com/auth/drive","Issued":"2025-11-20T18:53:12.188+08:00","IssuedUtc":"2025-11-20T10:53:12.188Z"} |
||||
Loading…
Reference in new issue