Skip to content

Instantly share code, notes, and snippets.

View wallstop's full-sized avatar
🎯
Focusing

Eli Pinkerton wallstop

🎯
Focusing
View GitHub Profile
using System;
using JetBrains.Annotations;
using UnityEngine;
namespace Assets.Scripts.Utility
{
[RequireComponent(typeof(SpriteRenderer))]
[RequireComponent(typeof(RectTransform))]
public sealed class SimpleSpriteColor : MonoBehaviour
{
class Ship
private boolean _done;
boolean isDone() { // Dock spin-loops on this
return _done;
}
void startJobs() {
if(jobQueue.isEmpty()) {
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
# Visual Studio 2015 cache directory
/.vs/
private bool _removed;
public bool Removed {
get {
return _removed;
}
set {
if(_removed == value) {
return;
}
/// <summary>
/// Triggers an attack, turning the damage area on and then off
/// </summary>
/// <returns>The weapon attack.</returns>
protected virtual IEnumerator MeleeWeaponAttack()
{
if (_attackInProgress) { yield break; }
_attackInProgress = true;
yield return new WaitForSeconds(InitialDelay);
@wallstop
wallstop / DataModels.md
Created October 18, 2017 04:26
DataModels

Data Models

id


column data type nullable? key type notes
public_id char(10) N primary server-side generated, unique hash, alphanumeric

The id table provides a way of generating unique ids for both landlords and tenants. Whenever a new landlord or tenant is created, the server generates a random ten-character string, then attempts to insert it into the db, repeating until it succeeds. This prevents leaking user numbers.

class ItemFactory
{
public static Dictionary<Type, Func<AbstractItem>> Thing = new Dictionary<Type, Func<AbstractItem>>();
}
abstract class AbstractItem {
// Item common methods go here
}
public class OptionalFieldDAO
{
private int? maybeValue_;
public OptionalFieldDAO(int? maybeValue)
{
maybeValue_ = maybeValue;
}
public bool Value(out int value)
public class BehaviorTree
{
Dictionary<BehaviorComponent, Goal> DetermineGoals(List<BehaviorComponent> resources);
}
private int InternalSample() {
int retVal;
int locINext = inext;
int locINextp = inextp;
if (++locINext >=56) locINext=1;
if (++locINextp>= 56) locINextp = 1;
retVal = SeedArray[locINext]-SeedArray[locINextp];