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 UnityEngine; | |
using UnityEditor; | |
using System.Linq; | |
using System.Reflection; | |
namespace BW { | |
[CustomPropertyDrawer(typeof(ExpandSO)), CanEditMultipleObjects] | |
public class ExpandSOPropDrawer : PropertyDrawer { |
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
//Example use would be Damage (source) to Health (target) | |
//which would lookup the sources Damage stat and deal that much damage to the target's Health stat. | |
public abstract class ScriptableStatInteractor : ScriptableObject | |
{ | |
[SerializeField] | |
protected ModularStat sourceStat = null; | |
[SerializeField] | |
protected ModularStat targetStat = null; | |
public abstract int Apply(StatBlock sourceBlock, StatBlock targetBlock); |
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 class TTFParser | |
{ | |
private string unparsedString; | |
private int textLength; | |
private int cursorPosition = 0; | |
private string currentString; | |
private const char openingTag = '<'; | |
private const char tagCancel = '/'; |
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 Sirenix.OdinInspector; | |
using UnityEngine; | |
namespace VisualNovelFramework | |
{ | |
public class VNDialogueController : MonoBehaviour | |
{ | |
[SerializeField] | |
private TMPShakeParser shakeParser = null; | |
[SerializeField] |
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
[TypeSelect(typeof(Component))] | |
public SerializedType componentType; |
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 static class FieldFactory | |
{ | |
private delegate VisualElement CreationDelegate(Type t, object o); | |
private static readonly Dictionary<Type, CreationDelegate> creationDictionary = | |
new Dictionary<Type, CreationDelegate>(); | |
private static readonly List<Type> creationTypes = new List<Type>(); | |
private static bool initialized = false; |
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 static class EffectsSystem | |
{ | |
private static readonly Dictionary<Type, List<IEffectRule>> allRules = new(); | |
public static void RegisterRule<T>(this IEffectRule<T> rule, Type ruleType) | |
where T : IEffect | |
{ | |
if(!allRules.TryGetValue(ruleType, out var specificRules)) | |
{ | |
specificRules = new List<IEffectRule>(); | |
allRules.Add(ruleType, specificRules); |
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 interface IRule<in Ruleable> : IRule | |
where Ruleable : IRuleable | |
{ | |
/// <summary> | |
/// Tries to run this specific rule. | |
/// </summary> | |
/// <returns>Returns true if the rule ran on this command.</returns> | |
bool RunIfValid(Ruleable ruleable); | |
} |
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 UnityEngine; | |
namespace Vampire.CG | |
{ | |
[Serializable] | |
public class CardDraggingState : IState | |
{ | |
[SerializeField] | |
private Transform transform; |
OlderNewer