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
// A Roguelike turn system | |
// http://blog.deadreckoned.com/post/91616626322/havenguard-turn-system | |
// Requires a fast max-heap Priority Queue (I like this one: http://blog.mischel.com/2007/06/22/priority-queue-in-c/) | |
public class TurnEntity | |
{ | |
/// <summary> | |
/// The delegate to execute when the object's turn is executed. | |
/// </summary> | |
public Action TurnHandler { get; set; } |
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
/// <summary> | |
/// Gets a position along a parabolic trajectory, given an origin and initial velocity. | |
/// </summary> | |
/// <param name="origin">The origin point.</param> | |
/// <param name="initialVelocity">The initial velocity.</param> | |
/// <param name="gravity">The gravity acceleration.</param> | |
/// <param name="t">The time along the curve (0...1).</param> | |
/// <returns>The position along the parabola at time <paramref name="t"/>.</returns> | |
public Vector3 Parabola(Vector3 origin, Vector3 initialVelocity, float gravity, float t) | |
{ |
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
# Add skip-worktree flag all modified files | |
git ls-files --modified | tr '\012' '\000' | xargs -0 git update-index --skip-worktree | |
# Remove skip-worktree flags on all files | |
git ls-files -v | grep -i ^S | cut -c 3- | tr '\012' '\000' | xargs -0 git update-index --no-skip-worktree |