Skip to content

Commit

Permalink
Splash added; Cover edited; Android debug added
Browse files Browse the repository at this point in the history
  • Loading branch information
AnanasikDev committed Mar 20, 2024
1 parent b439fcc commit c797f00
Show file tree
Hide file tree
Showing 10 changed files with 163 additions and 43 deletions.
Binary file added Assets/Graphics/Back4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Graphics/cover2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Graphics/splash1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Graphics/splash2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
140 changes: 138 additions & 2 deletions Assets/Scenes/SampleScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,140 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 418778339}
m_CullTransparentMesh: 1
--- !u!1 &438938569
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 438938570}
- component: {fileID: 438938572}
- component: {fileID: 438938571}
m_Layer: 5
m_Name: debug
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &438938570
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 438938569}
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: []
m_Father: {fileID: 1436317265}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 113.21, y: -42.5}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &438938571
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 438938569}
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:
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, 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: 16
m_fontSizeBase: 16
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
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!222 &438938572
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 438938569}
m_CullTransparentMesh: 1
--- !u!1 &455630552
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2886,7 +3020,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 1edf1ed36b5a23d4698c013fe6025fe9, type: 3}
m_Sprite: {fileID: 21300000, guid: a62ecd315ab9e4c44bf8cc28a3bfcf73, type: 3}
m_Type: 3
m_PreserveAspect: 0
m_FillCenter: 1
Expand Down Expand Up @@ -9693,6 +9827,7 @@ RectTransform:
- {fileID: 1995436797}
- {fileID: 1618320941}
- {fileID: 1945806681}
- {fileID: 438938570}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
Expand Down Expand Up @@ -10148,6 +10283,7 @@ MonoBehaviour:
type: 2}
toggleSettings_ResetClip: {fileID: 7400000, guid: 6100ff596e816ad4088b14ba1ced530d,
type: 2}
debug: {fileID: 438938571}
--- !u!82 &1565459793
AudioSource:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -11945,7 +12081,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 1edf1ed36b5a23d4698c013fe6025fe9, type: 3}
m_Sprite: {fileID: 21300000, guid: a62ecd315ab9e4c44bf8cc28a3bfcf73, type: 3}
m_Type: 3
m_PreserveAspect: 0
m_FillCenter: 1
Expand Down
2 changes: 0 additions & 2 deletions Assets/Scripts/GameStateController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ public void EnterGame()
Environment.scoreController.SetScore(0);
Environment.savingSystem.lastScore = 0;

Environment.scoreController.PlayRestartEffect();

Environment.playerController.Activate();

onEnterGame?.Invoke();
Expand Down
35 changes: 0 additions & 35 deletions Assets/Scripts/ScoreController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

public class ScoreController : MonoBehaviour
{

//[SerializeField] ParticleSystem[] AdditionEffectParticles;
//[SerializeField] ParticleSystem[] RestartEffectParticles;
private Animator scoreAnimator;

private Animation maxScoreAnimation;
[SerializeField] private AnimationClip maxScoreVanishClip;
[SerializeField] private AnimationClip maxScoreResetClip;
Expand All @@ -20,9 +15,7 @@ public class ScoreController : MonoBehaviour
public void Init()
{
SetScore(Environment.savingSystem.lastScore);
scoreAnimator = scoreText.GetComponent<Animator>();
maxScoreAnimation = maxScoreText.GetComponent<Animation>();
//maxScoreAnimation.GetClip("MaxScoreVanish").legacy = true;
maxScoreVanishClip.legacy = true;
maxScoreResetClip.legacy = true;
Environment.gameStateController.onEnterGame += EnterGameCallback;
Expand All @@ -44,39 +37,11 @@ private void OpenSettingsCallback()
maxScoreAnimation.Play("MaxScoreReset");
}

public void PlayAdditionEffect()
{
/*foreach (ParticleSystem particleSystem in AdditionEffectParticles)
{
ParticleSystem particles = Instantiate(particleSystem, transform);
particles.Play();
Destroy(particles, 3);
}*/
scoreAnimator = scoreText.GetComponent<Animator>();
if (score % 100 == 0)
scoreAnimator.SetTrigger("Add100");
else
scoreAnimator.SetTrigger("Add1 ");

}
public void PlayRestartEffect()
{
/*foreach (ParticleSystem particleSystem in RestartEffectParticles)
{
ParticleSystem particles = Instantiate(particleSystem, transform);
particles.Play();
Destroy(particles, 3);
}*/
}

public void SetScore(int n)
{
score = n;
Environment.savingSystem.maxScore = (score > Environment.savingSystem.maxScore) ? score : Environment.savingSystem.maxScore;
scoreText.text = score.ToString();

//if (score > 0) // Do not play on awake
// PlayAdditionEffect();
}
public void IncreaseScore(int n) => SetScore(score + n);
}
4 changes: 4 additions & 0 deletions Assets/Scripts/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class Settings : MonoBehaviour
[SerializeField] private AnimationClip toggleSettings_VanishClip;
[SerializeField] private AnimationClip toggleSettings_ResetClip;

public TextMeshProUGUI debug;

public Action onSettingsOpen;
public Action onSettingsClose;

Expand Down Expand Up @@ -189,9 +191,11 @@ private void GameEnterCallback()
{
// Start animation of disappearing of toggleSettings
toggleSettings_AnimationController.Play("SettingsButtonVanish");
debug.text += "SettingsButtonVanish\n";
}
private void SettingsOpenCallback()
{
toggleSettings_AnimationController.Play("SettingsButtonReset");
debug.text += "SettingsButtonReset\n";
}
}
8 changes: 5 additions & 3 deletions ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ PlayerSettings:
y: 0
width: 1
height: 1
m_SplashScreenLogos: []
m_SplashScreenLogos:
- logo: {fileID: 21300000, guid: 80f1fb6328e99524f8c5b20a56f2c495, type: 3}
duration: 2
m_VirtualRealitySplashScreen: {fileID: 0}
m_HolographicTrackingLossScreen: {fileID: 0}
defaultScreenWidth: 1024
Expand Down Expand Up @@ -139,7 +141,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0
bundleVersion: 1.5
bundleVersion: 1.7
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down Expand Up @@ -286,7 +288,7 @@ PlayerSettings:
- m_BuildTarget:
m_Icons:
- serializedVersion: 2
m_Icon: {fileID: 2800000, guid: 610ede1596100b1478a39a78b21bfe91, type: 3}
m_Icon: {fileID: 2800000, guid: 42b65cfb5a4bb6e448da617843c8e525, type: 3}
m_Width: 128
m_Height: 128
m_Kind: 0
Expand Down
17 changes: 16 additions & 1 deletion UserSettings/EditorUserSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ EditorUserSettings:
m_ObjectHideFlags: 0
serializedVersion: 4
m_ConfigSettings:
UnityRemoteCompression:
value: 337f73
flags: 0
UnityRemoteDevice:
value: 2d5e5a03
flags: 0
UnityRemoteResolution:
value: 2d5e460b0459
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650
flags: 0
Expand All @@ -13,7 +22,13 @@ EditorUserSettings:
m_VCDebugCmd: 0
m_VCDebugOut: 0
m_SemanticMergeMode: 2
m_DesiredImportWorkerCount: 4
m_StandbyImportWorkerCount: 2
m_IdleImportWorkerShutdownDelay: 60000
m_VCShowFailedCheckout: 1
m_VCOverwriteFailedCheckoutAssets: 1
m_VCOverlayIcons: 1
m_VCProjectOverlayIcons: 1
m_VCHierarchyOverlayIcons: 1
m_VCOtherOverlayIcons: 1
m_VCAllowAsyncUpdate: 0
m_ArtifactGarbageCollection: 1

0 comments on commit c797f00

Please sign in to comment.