static void LoadCueModifiers() { GetChannelInfos = ReflectionUtilities.CreateFieldGetter <MusicCue, MusicCue.MusicChannelInfo[]>("channelInfos"); SetChannelInfos = ReflectionUtilities.CreateFieldSetter <MusicCue, MusicCue.MusicChannelInfo[]>("channelInfos"); SetAlternatives = ReflectionUtilities.CreateFieldSetter <MusicCue, MusicCue.Alternative[]>("alternatives"); SetSnapshot = ReflectionUtilities.CreateFieldSetter <MusicCue, AudioMixerSnapshot>("snapshot"); SetInfoAudioClip = ReflectionUtilities.CreateFieldSetter <MusicCue.MusicChannelInfo, AudioClip>("clip"); SetInfoSync = ReflectionUtilities.CreateFieldSetter <MusicCue.MusicChannelInfo, MusicChannelSync>("sync"); }
static void Init() { GetPreferredWidthDirty = ReflectionUtilities.CreateFieldGetter <TMP_Text, bool>("m_isPreferredWidthDirty"); GetPreferredHeightDirty = ReflectionUtilities.CreateFieldGetter <TMP_Text, bool>("m_isPreferredHeightDirty"); SetPreferredWidthDirty = ReflectionUtilities.CreateFieldSetter <TMP_Text, bool>("m_isPreferredWidthDirty"); SetPreferredHeightDirty = ReflectionUtilities.CreateFieldSetter <TMP_Text, bool>("m_isPreferredHeightDirty"); On.TMPro.TextMeshProUGUI.SetLayoutDirty += TextMeshProUGUI_SetLayoutDirty; On.TMPro.TextMeshPro.SetLayoutDirty += TextMeshPro_SetLayoutDirty; }
void Awake() { //Debugger.Log("Weaver Game Cam Init!!!"); On.HutongGames.PlayMaker.Actions.ShakePosition.UpdateShaking += ShakePosition_UpdateShaking; On.HutongGames.PlayMaker.Actions.ShakePosition.OnExit += ShakePosition_OnExit; On.HutongGames.PlayMaker.Actions.ShakePosition.Reset += ShakePosition_Reset; shakerFSM = gameObject.LocateMyFSM("CameraShake"); ShakingHugeEvent = shakerFSM.FsmStates.First(e => e.Name == "ShakingHuge"); GetTimer = ReflectionUtilities.CreateFieldGetter <ShakePosition, float>("timer"); GetStartingWorldPosition = ReflectionUtilities.CreateFieldGetter <ShakePosition, Vector3>("startingWorldPosition"); SetTimer = ReflectionUtilities.CreateFieldSetter <ShakePosition, float>("timer"); StopAndReset = ReflectionUtilities.MethodToDelegate <Action <ShakePosition>, ShakePosition>("StopAndReset"); }