This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2023 Marc Schraffenberger | |
// This code is licensed under the terms of the MIT license | |
using UnityEngine; | |
using UnityEngine.Events; | |
public class Projectile : MonoBehaviour | |
{ | |
[SerializeField] | |
private UnityEvent endOfLifeEvent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2023 Marc Schraffenberger | |
// This code is licensed under the terms of the MIT license | |
using UnityEngine; | |
using UnityEngine.Pool; | |
public class ObjectPoolSource : MonoBehaviour | |
{ | |
[SerializeField] | |
private GameObject prefab; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2023 Marc Schraffenberger | |
// This code is licensed under the terms of the MIT license | |
using UnityEngine; | |
using UnityEngine.Events; | |
public class ItemPickup : MonoBehaviour | |
{ | |
[SerializeField] | |
private UnityEvent<GameObject> pickupEvent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2023 Marc Schraffenberger | |
// This code is licensed under the terms of the MIT license | |
using UnityEngine; | |
[CreateAssetMenuAttribute(fileName="GameplayAttribute", menuName="AttributeSystem/Gameplay Attribute")] | |
public class GameplayAttribute : ScriptableObject | |
{ | |
[UniqueIdentifier] | |
public string id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2022 Marc Schraffenberger | |
// This code is licensed under the terms of the MIT license | |
public class Checksum | |
{ | |
private uint A = 1; | |
private uint B = 0; | |
public void Append(byte value) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2022 Marc Schraffenberger | |
// This code is licensed under the terms of the MIT license | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using UnityEngine; | |
public class FileManager | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2022 Marc Schraffenberger | |
// This code is licensed under the terms of the MIT license | |
using System; | |
using UnityEngine; | |
using UnityEditor; | |
public class UniqueIdentifierAttribute : PropertyAttribute { } | |
#if UNITY_EDITOR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2022 Marc Schraffenberger | |
// This code is licensed under the terms of the MIT license | |
using UnityEngine; | |
using UnityEngine.Assertions; | |
// Unity base manager class to facilitate a singleton pattern | |
public abstract class Manager<T> : MonoBehaviour where T : Component | |
{ | |
public static T Instance { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2022 Marc Schraffenberger | |
// This code is licensed under the terms of the MIT license | |
using System.Diagnostics; | |
using UnityEngine; | |
// Unity wrapper class around Debug logger calls to support stripping logs from release builds | |
public class Log | |
{ | |
[Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2022 Marc Schraffenberger | |
// This code is licensed under the terms of the MIT license | |
using System.Collections.Generic; | |
using Unity.Profiling; | |
using UnityEngine; | |
public interface IUpdatable | |
{ | |
// time in seconds between update calls |
NewerOlder