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
| /* | |
| SpriteAnimator for Unity by Alec Holowka | |
| http://InfiniteAmmo.com - @infinite_ammo | |
| */ | |
| using UnityEngine; | |
| using System.Collections; | |
| public class SpriteAnimator : 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
| /* | |
| Tween for Unity by Alec Holowka | |
| http://InfiniteAmmo.com - @infinite_ammo | |
| */ | |
| using UnityEngine; | |
| using System.Collections; | |
| public class TweenBase : 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
| Shader "Sprites/Cutout" | |
| { | |
| Properties | |
| { | |
| [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
| _Color ("Tint", Color) = (1,1,1,1) | |
| [MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 | |
| _Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.5 | |
| } |
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
| // Rotate sprite/object towards mouse | |
| // Reference: http://johnstejskal.com/wp/rotating-objects-and-sprites-in-unity3d-using-cs-c/ | |
| // https://forum.unity3d.com/threads/how-to-detect-angle-from-one-object-to-another-in-2d.477510/ | |
| // Usage: Attach this script to sprite, use Orthographic camera! | |
| using UnityEngine; | |
| using System.Collections; | |
| public class RotateSpriteTowardsMouse : 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; | |
| /* | |
| * Most functions taken from Tween.js - Licensed under the MIT license | |
| * at https://github.com/sole/tween.js | |
| * Quadratic.Bezier by @fonserbc - Licensed under WTFPL license | |
| */ | |
| public delegate float EasingFunction(float k); | |
| public class Easing |
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
| /* | |
| * Created by C.J. Kimberlin | |
| * | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2019 | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights |
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
| # remove .DS_Store file from GitHub that MAC OS X creates | |
| # find and remove .DS_Store | |
| find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch | |
| # create .gitignore file, if needed | |
| touch .gitignore | |
| echo .DS_Store > .gitignore | |
| # push changes to GitHub |
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
| // Unity C# Cheat Sheet | |
| // I made these examples for students with prior exerience working with C# and Unity. | |
| // Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting |
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; | |
| public class BoxMover : MonoBehaviour | |
| { | |
| public enum Slide | |
| { | |
| None, | |
| Perpendicular, |
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; | |
| public class Player : MonoBehaviour | |
| { | |
| public float speedX; | |
| public float accelX; | |
| public float decelX; | |
| public float gravity; |
OlderNewer