using UnityEngine; | |
public enum PathMovementStyle | |
{ | |
Continuous, | |
Slerp, | |
Lerp, | |
} | |
public class PathController : MonoBehaviour | |
{ |
$('a').click(function(e) { | |
e.preventDefault(); | |
var url = this.href; | |
$.get(url, function(html) { | |
$('.newpage').html(html).animate({ left: "-= 1000px" }, function() { | |
window.history.pushState({}, "New Page Title", url ); | |
}); | |
}); | |
return false; | |
}); |
🎉 Merged PR #3 in troublecatstudios/noir-unity | |
💪 Opened PR #3 in troublecatstudios/noir-unity | |
🎉 Merged PR #77 in troublecatstudios/todo-issues | |
🎉 Merged PR #76 in troublecatstudios/todo-issues | |
🎉 Merged PR #72 in troublecatstudios/todo-issues |
⭐ Total Stars: 41 | |
➕ Total Commits: 2.0k | |
🔀 Total PRs: 110 | |
🚩 Total Issues: 61 | |
📦 Contributed to: 9 |
using System; | |
using UnityEngine; | |
namespace Noirlib { | |
/// <summary> | |
/// Inherit from this base class to create a singleton. | |
/// e.g. public class MyClassName : NoirSingleton<MyClassName> {} | |
/// </summary> | |
public class NoirSingleton<T> : MonoBehaviour where T : MonoBehaviour { | |
// Check to see if we're about to be destroyed. |
I was building a CLI for GitHub code search which was using promises pretty heavily as the control flow of the application. It worked well enough in the beginning because the network library was promise based. However I wanted to add a feature where you could query the JSON returned by the GitHub API using json-query. This required that the user enter a REPL-type interaction, where they can enter a command and see the output, rinse and repeat until they have the data they want.
The problem is that all of the I/O in node is non-blocking. This means that all the libraries i looked at to capture user input from the command line were all either prommise based, or used node style method(data, callback)
invocations. This ruled out my first option: using a while
loop inside a promise to repeat the REPL until the user entered 'done'. If I did this I'd end up firing hundreds or thousands of calls to readline
(the library I ended up using) to gather user i
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
namespace NoirLib { | |
public static class CollectionExtensions { | |
private static readonly System.Random _rand = new System.Random(); | |
public static T Random<T>(this T[] items) { |
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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS I
// NOTE DONT put in an editor folder! | |
using UnityEngine; | |
public enum AutohookSearchArea { | |
Self, | |
Parent, | |
Children | |
} | |
public class AutohookAttribute : PropertyAttribute |