gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
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
// Usage: | |
m_SideBarTexture = CreateTexture (CreateColor ("#30433C")); | |
// The goodness: | |
static Color CreateColor (string hexCode, float alpha = 1.0f) | |
{ | |
if (hexCode.Length == 7 && hexCode[0] == '#') | |
{ |
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
<form action="/"> | |
<legend>A Sample Form Legend</legend> | |
<label for="name">Name: </label> | |
<input type="text" value="Name" name="Name" /> | |
<label for="email">Email: </label> | |
<input type="email" value="Email" name="Email" /> |
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; | |
using System.Collections; | |
// This is basically how the Super Metroid camera worked. Whichever direction you moved, the camera would | |
// move in the same direction a multiple of the player's speed. Once the center of the camera moved a | |
// certain distance from the player, the camera would lock on the player and move the same speed. Change | |
// movement direction, and the camera would once again move more quickly to catch up and place itself | |
// ahead of the player's movement. | |
// Super Metroid also had area limits and locked certain axes based on where you were. For instance, if |
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
public class Perlin { | |
public static double OctavePerlin(double x, double y, double z, int octaves, double persistence) { | |
double total = 0; | |
double frequency = 1; | |
double amplitude = 1; | |
for(int i=0;i<octaves;i++) { | |
total += perlin(x * frequency, y * frequency, z * frequency) * amplitude; | |
amplitude *= persistence; |
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; | |
using System.Collections; | |
// based on http://unitytipsandtricks.blogspot.com/2013/05/camera-shake.html | |
public class PerlinShake : MonoBehaviour | |
{ | |
public float duration = 2f; | |
public float speed = 20f; | |
public float magnitude = 2f; | |
public AnimationCurve damper = new AnimationCurve(new Keyframe(0f, 1f), new Keyframe(0.9f, .33f, -2f, -2f), new Keyframe(1f, 0f, -5.65f, -5.65f)); |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
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
namespace Helpers | |
{ | |
internal static class SubstringExtensions | |
{ | |
/// <summary> | |
/// Get string value between [first] a and [last] b. | |
/// </summary> | |
public static string Between(this string value, string a, string b) | |
{ | |
int posA = value.IndexOf(a); |