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
using UnityEngine; | |
namespace JamesFrowen.Variables | |
{ | |
public abstract class SingletonScriptableObject<T> : ScriptableObject where T : ScriptableObject | |
{ | |
protected static T _instance; | |
public static T Instance | |
{ | |
get |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class FixedDistanceMove : MonoBehaviour | |
{ | |
private bool moving = false; | |
public void StartMove(Vector3 target, float travelTime) | |
{ |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public interface IMonoBehaviour | |
{ | |
// Object | |
string name { get; } | |
// Component |
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
/* | |
GameObject A would have PlayerControler and SetPlayerReference. | |
GameObject B would have WantsToUsePlayer. | |
SetPlayerReference and WantsToUsePlayer have same PlayerReference set via the inspector. | |
WantsToUsePlayer will be able to use PlayerReference to have reference to PlayerControler. Even if GameObject A is spawned from a prefab after the game starts. | |
*/ |
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
namespace JamesFrowen | |
{ | |
public interface ISomeInterface | |
{ | |
void SomeMethod(); | |
} | |
[System.Serializable] | |
public class SomeInterfaceWrapper : InterfaceWrapper<ISomeInterface> | |
{ |
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
using UnityEditor; | |
using UnityEngine; | |
namespace EditorScripts | |
{ | |
public abstract class SerializedEditorWindow : EditorWindow | |
{ | |
/// <summary> | |
/// Serialization target, can be overridden to allow target to be something other than this editor window | |
/// </summary> |
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
using System; | |
using System.Collections; | |
using System.IO; | |
using Mirror; | |
using UnityEngine; | |
namespace ScreenShotDemo | |
{ | |
public class SendImage : MonoBehaviour | |
{ |
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
using Mirror; | |
using ProjectWolves.Networking; | |
using UnityEngine; | |
namespace ProjectWolves.Weapons | |
{ | |
public class NetworkProjectile : MonoBehaviour | |
{ | |
public uint ProjectileId { get; set; } | |
public uint LocalId { get; 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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Net; | |
using System.Net.Sockets; | |
using Telepathy; | |
using UnityEngine; | |
using UnityEngine.Serialization; | |
namespace Mirror |
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
public abstract class AssetSet : ScriptableObject { } | |
public abstract class AssetSet<T> : AssetSet where T : Object | |
{ | |
[SerializeField] protected List<T> _items = new List<T>(); | |
private Dictionary<string, T> _dictionary; | |
public string TypeName => typeof(T).Name; | |
public const string CAN_NOT_FIND_WARNING = "{0} could not find {1}"; |
OlderNewer