This file contains hidden or 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
using System; | |
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class IncreaseScoreOverTime : MonoBehaviour | |
{ | |
//The text component that the score will be displayed on. | |
[SerializeField] | |
private Text _scoreText; |
This file contains hidden or 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
using UnityEngine; | |
using System.Collections; | |
public class CameraShake : MonoBehaviour { | |
private bool _isShaking = false; | |
[SerializeField]private float _shakeDuration = 0.25f; | |
[SerializeField]private float _originalXPos = 0f; | |
[SerializeField]private float _originalYPos = 0f; |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
/// <summary> | |
/// Repository of commonly used prefabs. | |
/// </summary> | |
[AddComponentMenu("Gameplay/ObjectPool")] | |
public class ObjectPool : MonoBehaviour |
This file contains hidden or 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
using System.Collections; | |
using UnityEngine; | |
using DG.Tweening; | |
namespace Audio | |
{ | |
public class SFXManager : MonoBehaviour | |
{ | |
//Instance of this script. | |
private static SFXManager s_Instance = null; |
This file contains hidden or 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class ImageAnimation : MonoBehaviour | |
{ | |
[SerializeField] | |
private Image _animatedImage; |
This file contains hidden or 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
using System; | |
using System.IO; | |
using UnityEngine; | |
using System.Runtime.Serialization.Formatters.Binary; | |
namespace Serialization | |
{ | |
public class Serializer | |
{ | |
public static void Save<T>(string filename, T data) where T : class |
This file contains hidden or 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class ColorLerp : MonoBehaviour | |
{ | |
[SerializeField] | |
private Image _imageToLerp; |
This file contains hidden or 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
/* | |
#SCRIPTNAME#.cs | |
Created #CREATIONDATE# | |
Project #PROJECTNAME# by #DEVELOPERS# | |
*/ | |
using UnityEngine; | |
namespace #NAMESPACE# | |
{ | |
public class #SCRIPTNAME# : MonoBehaviour |
This file contains hidden or 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
using UnityEngine; | |
using UnityEditor; | |
public class KeywordReplace : UnityEditor.AssetModificationProcessor | |
{ | |
public static void OnWillCreateAsset(string path) | |
{ | |
path = path.Replace(".meta", ""); | |
int index = path.LastIndexOf("."); | |
string file; |
This file contains hidden or 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
using System.Collections.Generic; | |
using UnityEngine; | |
public static class ExtensionMethods | |
{ | |
#region List | |
public static void ShuffleList<T>(this List<T> list) | |
{ | |
List<T> tempList = list; | |
for (int i = 0; i < tempList.Count; i++) |
OlderNewer