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
using System; | |
using UnityEngine; | |
using UnityEngine.Tilemaps; | |
using Random = UnityEngine.Random; | |
public class PlayerAnimator : MonoBehaviour { | |
[SerializeField] private float _minImpactForce = 20; | |
// Anim times can be gathered from the state itself, but | |
// for the simplicity of the video... |
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
using UnityEngine; | |
/* | |
* Swipe Input script for Unity by @fonserbc, free to use wherever | |
* | |
* Attack to a gameObject, check the static booleans to check if a swipe has been detected this frame | |
* Eg: if (SwipeInput.swipedRight) ... | |
* | |
* | |
*/ |
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
// Unlit texture shader which casts shadow on Forward/Defered | |
Shader "Unlit/Texture CastShadow" { | |
Properties { | |
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
} | |
SubShader { | |
Tags {"Queue"="Opaque" } | |
LOD 100 |
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
// Unlit texture shader which casts shadow on Forward/Defered | |
Shader "Unlit/Texture CastShadow" { | |
Properties { | |
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
} | |
SubShader { | |
Tags {"Queue"="Opaque" } | |
LOD 100 |
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
#if UNITY_EDITOR | |
using UnityEditor; | |
using UnityEditor.Callbacks; | |
using UnityEngine; | |
public class BuildNumberIncrementer | |
{ | |
[PostProcessBuild] | |
public static void OnBuildComplete(BuildTarget buildTarget, string pathToBuiltProject) |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MeshDestroy : MonoBehaviour | |
{ | |
private bool edgeSet = false; | |
private Vector3 edgeVertex = Vector3.zero; | |
private Vector2 edgeUV = Vector2.zero; |
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
using System.Collections.Generic; | |
public class PlayerPrefsTools | |
{ | |
public static void GetAllPlayerPrefKeys(ref List<string> keys) | |
{ | |
if (keys != null) | |
{ | |
keys.Clear(); | |
} |