예제 #1
0
        protected override void DrawUniqueDetectorProperties()
        {
            WallHackDetector detector = (self as WallHackDetector);

            if (detector == null)
            {
                return;
            }

            if (PropertyFieldChanged(checkRigidbody, new GUIContent("Rigidbody")))
            {
                detector.CheckRigidbody = checkRigidbody.boolValue;
            }

            if (PropertyFieldChanged(checkController, new GUIContent("Character Controller")))
            {
                detector.CheckController = checkController.boolValue;
            }

            if (PropertyFieldChanged(checkWireframe, new GUIContent("Wireframe")))
            {
                detector.CheckWireframe = checkWireframe.boolValue;
            }
            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(wireframeDelay, new GUIContent("Delay"));
            EditorGUI.indentLevel--;

            if (PropertyFieldChanged(checkRaycast, new GUIContent("Raycast")))
            {
                detector.CheckRaycast = checkRaycast.boolValue;
            }
            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(raycastDelay, new GUIContent("Delay"));
            EditorGUI.indentLevel--;

            EditorGUILayout.Separator();

            EditorGUILayout.PropertyField(spawnPosition);
            EditorGUILayout.PropertyField(maxFalsePositives);

            EditorGUILayout.Separator();

            if (!ActSettings.IsWallhackDetectorShaderIncluded())
            {
                EditorGUILayout.Separator();
                EditorGUILayout.LabelField("You need to include specific shader into your build to let WallHackDetector work properly.", EditorStyles.wordWrappedLabel);
                if (GUILayout.Button("Include in Settings..."))
                {
                    ActSettings.ShowWindow();
                }
            }
        }
예제 #2
0
 public void LoadAct(ActSettings settings) {
     if(settings.type == "Drawing") {
         currentAct = Instantiate(drawingViewerPrefab).GetComponent<ActViewer>();
         currentAct.settings = settings;
         currentAct.ActInit();
     }
     else if(settings.type == "Typing") {
         currentAct = Instantiate(typingViewerPrefab).GetComponent<ActViewer>();
         currentAct.settings = settings;
         currentAct.ActInit();
     }
     throw new InvalidActTypeException(settings.type);
 }
예제 #3
0
 public void LoadAct(ActSettings settings)
 {
     if (settings.type == "Drawing")
     {
         currentAct = Instantiate(drawingControllerPrefab, transform).GetComponent <DrawingController>();
     }
     else if (settings.type == "Typing")
     {
         currentAct = Instantiate(typingControllerPrefab, transform).GetComponent <TypingController>();
     }
     else
     {
         throw new InvalidActTypeException(settings.type);
     }
     currentAct.settings = settings;
 }
 protected override void DrawUniqueDetectorProperties()
 {
     if (!EditorPrefs.GetBool(ActEditorGlobalStuff.PREFS_INJECTION_ENABLED))
     {
         EditorGUILayout.Separator();
         EditorGUILayout.LabelField("Injection Detector is not enabled!", EditorStyles.boldLabel);
         if (GUILayout.Button("Enable in Settings..."))
         {
             ActSettings.ShowWindow();
         }
     }
     else if (!ActPostprocessor.IsInjectionDetectorTargetCompatible())
     {
         EditorGUILayout.LabelField("Injection Detector disabled for this platform.", EditorStyles.boldLabel);
     }
 }
예제 #5
0
        protected override void DrawUniqueDetectorProperties()
        {
            WallHackDetector detector = self as WallHackDetector;

            if (detector == null)
            {
                return;
            }

            if (PropertyFieldChanged(checkRigidbody, new GUIContent("Rigidbody")))
            {
                detector.CheckRigidbody = checkRigidbody.boolValue;
            }

            if (PropertyFieldChanged(checkController, new GUIContent("Character Controller")))
            {
                detector.CheckController = checkController.boolValue;
            }

            if (PropertyFieldChanged(checkWireframe, new GUIContent("Wireframe")))
            {
                detector.CheckWireframe = checkWireframe.boolValue;
            }
            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(wireframeDelay, new GUIContent("Delay"));
            EditorGUI.indentLevel--;

            if (PropertyFieldChanged(checkRaycast, new GUIContent("Raycast")))
            {
                detector.CheckRaycast = checkRaycast.boolValue;
            }
            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(raycastDelay, new GUIContent("Delay"));
            EditorGUI.indentLevel--;

            EditorGUILayout.Separator();

            EditorGUILayout.PropertyField(spawnPosition);
            EditorGUILayout.PropertyField(maxFalsePositives);

            EditorGUILayout.Separator();

            if (!ActSettings.IsWallhackDetectorShaderIncluded())
            {
                EditorGUILayout.Separator();
                EditorGUILayout.LabelField("You need to include specific shader into your build to let WallHackDetector work properly.", EditorStyles.wordWrappedLabel);
                if (GUILayout.Button("Include in Settings..."))
                {
                    ActSettings.ShowWindow();
                }
            }

            if (checkRaycast.boolValue || checkController.boolValue || checkRigidbody.boolValue)
            {
                int layerId = LayerMask.NameToLayer("Ignore Raycast");
                if (Physics.GetIgnoreLayerCollision(layerId, layerId))
                {
                    EditorGUILayout.LabelField("IgnoreRaycast physics layer should collide with itself to avoid false positives! See readme's troubleshooting section for details.", EditorStyles.wordWrappedLabel);
                    if (GUILayout.Button("Edit in Physics settings"))
                    {
                        EditorApplication.ExecuteMenuItem("Edit/Project Settings/Physics");
                    }
                }
            }
        }