Exemplo n.º 1
0
 static TurnTheKeyComponentSolver()
 {
     ComponentType          = ReflectionHelper.FindType("TurnKeyModule");
     LockField              = ComponentType.GetField("Lock", BindingFlags.Public | BindingFlags.Instance);
     ActivatedField         = ComponentType.GetField("bActivated", BindingFlags.NonPublic | BindingFlags.Instance);
     SolvedField            = ComponentType.GetField("bUnlocked", BindingFlags.NonPublic | BindingFlags.Instance);
     TargetTimeField        = ComponentType.GetField("mTargetSecond", BindingFlags.NonPublic | BindingFlags.Instance);
     StopAllCorotinesMethod = ComponentType.GetMethod("StopAllCoroutines", BindingFlags.Public | BindingFlags.Instance);
     KeyAnimatorField       = ComponentType.GetField("KeyAnimator", BindingFlags.Public | BindingFlags.Instance);
     DisplayField           = ComponentType.GetField("Display", BindingFlags.Public | BindingFlags.Instance);
     KeyUnlockedField       = ComponentType.GetField("bUnlocked", BindingFlags.NonPublic | BindingFlags.Instance);
     KeyAudioField          = ComponentType.GetField("mAudio", BindingFlags.NonPublic | BindingFlags.Instance);
     _keyTurnTimes          = new List <int>();
 }
Exemplo n.º 2
0
 static TurnTheKeyAdvancedComponentSolver()
 {
     ComponentType       = ReflectionHelper.FindType("TurnKeyAdvancedModule");
     LeftKeyField        = ComponentType.GetField("LeftKey", BindingFlags.Public | BindingFlags.Instance);
     RightKeyField       = ComponentType.GetField("RightKey", BindingFlags.Public | BindingFlags.Instance);
     ActivatedField      = ComponentType.GetField("bActivated", BindingFlags.NonPublic | BindingFlags.Instance);
     BeforeLeftKeyField  = ComponentType.GetField("LeftBeforeA", BindingFlags.NonPublic | BindingFlags.Static);
     BeforeRightKeyField = ComponentType.GetField("RightBeforeA", BindingFlags.NonPublic | BindingFlags.Static);
     AfterLeftKeyField   = ComponentType.GetField("LeftAfterA", BindingFlags.NonPublic | BindingFlags.Static);
     AfterLeftKeyField?.SetValue(null, LeftAfterA);
     LeftKeyTurnedField    = ComponentType.GetField("bLeftKeyTurned", BindingFlags.NonPublic | BindingFlags.Instance);
     RightKeyTurnedField   = ComponentType.GetField("bRightKeyTurned", BindingFlags.NonPublic | BindingFlags.Instance);
     OnLeftKeyTurnMethod   = ComponentType.GetMethod("OnLeftKeyTurn", BindingFlags.NonPublic | BindingFlags.Instance);
     OnRightKeyTurnMethod  = ComponentType.GetMethod("OnRightKeyTurn", BindingFlags.NonPublic | BindingFlags.Instance);
     RightKeyAnimatorField = ComponentType.GetField("RightKeyAnim", BindingFlags.Public | BindingFlags.Instance);
     LeftKeyAnimatorField  = ComponentType.GetField("LeftKeyAnim", BindingFlags.Public | BindingFlags.Instance);
 }
 static SwitchesComponentSolver()
 {
     ComponentType  = ReflectionHelper.FindType("SwitchModule");
     OnToggleMethod = ComponentType.GetMethod("OnToggle", BindingFlags.NonPublic | BindingFlags.Instance);
 }