Skip to content

Instantly share code, notes, and snippets.

View codeimpossible's full-sized avatar
🍕
P I Z Z A

Jared Barboza codeimpossible

🍕
P I Z Z A
View GitHub Profile
@codeimpossible
codeimpossible / Jared Barboza's GitHub Stats
Last active June 5, 2022 12:07
Github Activity Summary
⭐ Total Stars: 41
➕ Total Commits: 2.0k
🔀 Total PRs: 110
🚩 Total Issues: 61
📦 Contributed to: 9
@codeimpossible
codeimpossible / 👣Recent Activity
Last active June 19, 2023 00:02
Recent Activity
🎉 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
@codeimpossible
codeimpossible / NoirSingleton.cs
Created August 28, 2021 17:37
My own implementation of the Singleton pattern for Unity GameObjects
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.
@codeimpossible
codeimpossible / CollectionExtensions.cs
Created May 7, 2021 12:45
Sound Effect Scriptable Object
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) {
@codeimpossible
codeimpossible / LICENSE.md
Last active May 6, 2021 12:22
Tags, Layers and Scene Builder - Auto Generate Tags, Layers and Scenes classes containing consts for all variables for code completion

MIT License

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
@codeimpossible
codeimpossible / AutohookAttribute.cs
Last active October 1, 2019 04:27 — forked from LotteMakesStuff/AutohookAttribute.cs
[Autohook] property drawer for unity - Add this [Autohook] attribute to a property to and the inspector will automagically hook up a valid reference for you if it can find a component attached to the same game object that matches the field you put it on. You can watch a demo of this in action here https://youtu.be/faVt09NGzws <3
// NOTE DONT put in an editor folder!
using UnityEngine;
public enum AutohookSearchArea {
Self,
Parent,
Children
}
public class AutohookAttribute : PropertyAttribute
@codeimpossible
codeimpossible / CameraController2D.cs
Created December 6, 2017 01:37
Camera Controller for my 2D Game
using UnityEngine;
public class CameraController2D : MonoBehaviour
{
public Transform ObjectToFollow;
public Camera CameraToMove;
public Vector2 CameraPositionOffset = Vector2.zero;
public Vector3 CameraTrackingBox = Vector3.one;
@codeimpossible
codeimpossible / PathController.cs
Created November 25, 2017 01:58
Really simple path follower script for unity
using UnityEngine;
public enum PathMovementStyle
{
Continuous,
Slerp,
Lerp,
}
public class PathController : MonoBehaviour
{
@codeimpossible
codeimpossible / GameManager.cs
Created November 22, 2017 20:42
Cross Platform GamePad Input for Unity
using System;
using UnityEngine;
public class GameManager : MonoBehaviour {
public IInputSystem Input;
public static GameManager Instance;
void Awake() {