This repository has been archived by the owner on Aug 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Coins (to UI for now), and Leaves Particles
- Loading branch information
Showing
21 changed files
with
5,940 additions
and
625 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
public class ParticleManager : MonoBehaviour { | ||
public ParticleSystem leafSystem; | ||
|
||
public bool leavesParticle; | ||
|
||
void Start() { | ||
leafSystem = GetComponent<ParticleSystem>(); | ||
leavesParticle = false; | ||
} | ||
|
||
void Update() { | ||
if (leavesParticle) { | ||
leafSystem.Play(); | ||
} else { | ||
leafSystem.Stop(); | ||
} | ||
} | ||
|
||
void ParticleEnabler(string name, bool status) { | ||
if (name == "leaves") { | ||
if (status) { | ||
leavesParticle = true; | ||
} else { | ||
leavesParticle = false; | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using UnityEngine; | ||
using System.Collections; | ||
using UnityEngine.UI; | ||
|
||
public class UISpriteAnimator : MonoBehaviour { | ||
|
||
public Sprite[] sprites; | ||
public int spritePerFrame = 6; | ||
public bool loop = true; | ||
public bool destroyOnEnd = false; | ||
|
||
private int index = 0; | ||
private Image image; | ||
private int frame = 0; | ||
|
||
void Awake() { | ||
image = GetComponent<Image> (); | ||
} | ||
|
||
void Update () { | ||
if (!ESCMenu.menuOpen) { | ||
if (!loop && index == sprites.Length) return; | ||
frame ++; | ||
if (frame < spritePerFrame) return; | ||
image.sprite = sprites [index]; | ||
frame = 0; | ||
index ++; | ||
if (index >= sprites.Length) { | ||
if (loop) index = 0; | ||
if (destroyOnEnd) Destroy (gameObject); | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.