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:
| // 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: | |
| // |
| 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, |
| /// | |
| /// 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: | |
| /// |
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| public static class ListExtensions | |
| { | |
| public static T PickRandom<T>(this IList<T> source) | |
| { | |
| if (source.Count == 0) | |
| return default(T); |
| # Ignore everything | |
| /* | |
| /*/ | |
| # Inverse ignore some stuff | |
| !/Assets/ | |
| !/ProjectSettings/ | |
| !.gitignore | |
| # OS Stuff |
| using UnityEngine; | |
| public static class ColliderExtensions { | |
| public static bool IsVisibleFrom(this Collider collider, Camera camera) | |
| { | |
| Plane[] planes = GeometryUtility.CalculateFrustumPlanes(camera); | |
| return GeometryUtility.TestPlanesAABB(planes, collider.bounds); | |
| } | |