Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
| public static class CameraUtils | |
| { | |
| private static readonly Vector3 VectorZero = new Vector3(0,0,0); | |
| private static readonly Vector3 VectorForward = new Vector3(0,0,1); | |
| public static Vector3 ScreenCoordToWorldWithPlane(this UnityEngine.Camera camera, Vector3 screenCoord) | |
| { | |
| var plane = new Plane(VectorForward, VectorZero); | |
| var ray = camera.ScreenPointToRay(screenCoord); | |
| float enter; |
| // Based on http://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php | |
| public enum NodeStatus | |
| { | |
| Success, Failure, Running | |
| } | |
| public interface IBehaviorNode | |
| { | |
| NodeStatus Execute(Entity entity); |
| // TinyTween.cs | |
| // | |
| // Copyright (c) 2013 Nick Gravelyn | |
| // | |
| // 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 to use, copy, modify, merge, publish, distribute, | |
| // sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: | |
| // |
| public void Initialize() | |
| { | |
| _pool.SetTick(0, 0, 0); | |
| // Start coroutine | |
| MainThreadDispatcher.StartUpdateMicroCoroutine(DelayedUpdateWithAccumulatorCoroutine()); | |
| } | |
| private IEnumerator DelayedUpdateWithAccumulatorCoroutine() | |
| { | |
| var sw = new Stopwatch(); |
| using System; | |
| namespace Entitas { | |
| /** Used in the *AnyChangeObservable methods to observe multiple change types */ | |
| [Flags] | |
| public enum ChangeType : short{ | |
| Addition = 1 << 0, | |
| Replacement = 1 << 1, | |
| Removal = 1 << 2, |
| using UnityEngine; | |
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| #endif | |
| [System.Serializable] | |
| public class SceneField | |
| { | |
| [SerializeField] | |
| private Object m_SceneAsset; | |
| [SerializeField] |
| /// | |
| /// Simple pooling for Unity. | |
| /// Author: Martin "quill18" Glaude (quill18@quill18.com) | |
| /// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267 | |
| /// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
| /// UPDATES: | |
| /// 2015-04-16: Changed Pool to use a Stack generic. | |
| /// | |
| /// Usage: | |
| /// |