-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
public class CanvasGroupFadeInOnRequest : MonoBehaviour { | ||
public CanvasGroup Group; | ||
public float Alpha = 0f; | ||
public float FadeInAlpha = 1f; | ||
public float FadeInRate = 0.1f; | ||
public float Threshold = 0.1f; | ||
|
||
public IEnumerator FadeInCoroutine(){ | ||
while(Alpha <= FadeInAlpha){ | ||
Alpha = Mathf.Lerp (Alpha, FadeInAlpha, FadeInRate); | ||
if (Mathf.Abs (FadeInAlpha - Alpha) < Threshold) | ||
Alpha = FadeInAlpha; | ||
Group.alpha = Alpha; | ||
yield return new WaitForEndOfFrame(); | ||
} | ||
yield return 0; | ||
} | ||
|
||
public void RequestFadeIn(){ | ||
StartCoroutine (FadeInCoroutine()); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
using UnityEngine.SceneManagement; | ||
|
||
public class EndScreen : MonoBehaviour { | ||
public CanvasGroupFadeInOnRequest CanvasManager; | ||
public Image Bg; | ||
public float Alpha = 0f; | ||
public float FadeInAlpha = 216f; | ||
public float FadeInRate = 0.1f; | ||
public float Threshold = 1f; | ||
public float DelayTime = 5f; | ||
public bool DO_IT = false; | ||
private void Update() | ||
{ | ||
if (DO_IT) | ||
FadeIn(); | ||
} | ||
// Use this for initialization | ||
public void FadeIn() { | ||
CanvasManager.RequestFadeIn (); | ||
StartCoroutine (FadeInCoroutine()); | ||
} | ||
|
||
public IEnumerator FadeInCoroutine() | ||
{ | ||
StartCoroutine(DelayToStart()); | ||
Color col; | ||
Bg = GetComponent<Image> (); | ||
while(Alpha <= FadeInAlpha){ | ||
Alpha = Mathf.Lerp (Alpha, FadeInAlpha, FadeInRate); | ||
if (Mathf.Abs (FadeInAlpha - Alpha) < Threshold) | ||
Alpha = FadeInAlpha; | ||
col = Bg.color; | ||
col.a = Alpha; | ||
Bg.color = col; | ||
yield return new WaitForEndOfFrame(); | ||
} | ||
yield return 0; | ||
} | ||
|
||
public IEnumerator DelayToStart(){ | ||
yield return new WaitForSeconds(DelayTime); | ||
SceneManager.LoadScene ("StartMenu"); | ||
yield return 0; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.SceneManagement; | ||
|
||
public class OnClickLoadScene : MonoBehaviour { | ||
public string SceneName; | ||
|
||
public void LoadScene(){ | ||
SceneManager.LoadScene (SceneName); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
public class QuitButton : MonoBehaviour { | ||
|
||
// Use this for initialization | ||
public void Quit(){ | ||
Application.Quit(); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
public class SetTextEqualTo : MonoBehaviour { | ||
public Text Target; | ||
public Text ThisText; | ||
|
||
// Update is called once per frame | ||
void Update () { | ||
ThisText.text = Target.text; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
=== Sat Aug 3 03:25:41 2019 | ||
|
||
Packages were changed. | ||
Update Mode: updateDependencies | ||
|
||
The following packages were added: | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
The following packages were updated: | ||
com.unity.analytics from version 2.0.16 to 3.3.2 | ||
com.unity.package-manager-ui from version 1.9.11 to 2.2.0 | ||
com.unity.purchasing from version 2.0.3 to 2.0.6 | ||
com.unity.textmeshpro from version 1.2.4 to 2.0.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"dependencies": { | ||
"com.unity.2d.sprite": "1.0.0", | ||
"com.unity.2d.tilemap": "1.0.0", | ||
"com.unity.ads": "2.0.8", | ||
"com.unity.analytics": "3.3.2", | ||
"com.unity.collab-proxy": "1.2.16", | ||
"com.unity.ext.nunit": "1.0.0", | ||
"com.unity.ide.rider": "1.0.8", | ||
"com.unity.ide.vscode": "1.0.7", | ||
"com.unity.multiplayer-hlapi": "1.0.2", | ||
"com.unity.package-manager-ui": "2.2.0", | ||
"com.unity.purchasing": "2.0.6", | ||
"com.unity.test-framework": "1.0.13", | ||
"com.unity.textmeshpro": "2.0.1", | ||
"com.unity.timeline": "1.1.0", | ||
"com.unity.ugui": "1.0.0", | ||
"com.unity.xr.legacyinputhelpers": "2.0.2", | ||
"com.unity.modules.ai": "1.0.0", | ||
"com.unity.modules.androidjni": "1.0.0", | ||
"com.unity.modules.animation": "1.0.0", | ||
"com.unity.modules.assetbundle": "1.0.0", | ||
"com.unity.modules.audio": "1.0.0", | ||
"com.unity.modules.cloth": "1.0.0", | ||
"com.unity.modules.director": "1.0.0", | ||
"com.unity.modules.imageconversion": "1.0.0", | ||
"com.unity.modules.imgui": "1.0.0", | ||
"com.unity.modules.jsonserialize": "1.0.0", | ||
"com.unity.modules.particlesystem": "1.0.0", | ||
"com.unity.modules.physics": "1.0.0", | ||
"com.unity.modules.physics2d": "1.0.0", | ||
"com.unity.modules.screencapture": "1.0.0", | ||
"com.unity.modules.terrain": "1.0.0", | ||
"com.unity.modules.terrainphysics": "1.0.0", | ||
"com.unity.modules.tilemap": "1.0.0", | ||
"com.unity.modules.ui": "1.0.0", | ||
"com.unity.modules.uielements": "1.0.0", | ||
"com.unity.modules.umbra": "1.0.0", | ||
"com.unity.modules.unityanalytics": "1.0.0", | ||
"com.unity.modules.unitywebrequest": "1.0.0", | ||
"com.unity.modules.unitywebrequestassetbundle": "1.0.0", | ||
"com.unity.modules.unitywebrequestaudio": "1.0.0", | ||
"com.unity.modules.unitywebrequesttexture": "1.0.0", | ||
"com.unity.modules.unitywebrequestwww": "1.0.0", | ||
"com.unity.modules.vehicles": "1.0.0", | ||
"com.unity.modules.video": "1.0.0", | ||
"com.unity.modules.vr": "1.0.0", | ||
"com.unity.modules.wind": "1.0.0", | ||
"com.unity.modules.xr": "1.0.0" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
m_EditorVersion: 5.5.0f3 | ||
m_EditorVersion: 2019.2.0f1 | ||
m_EditorVersionWithRevision: 2019.2.0f1 (20c1667945cf) |