Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- #if UNITY_EDITOR
- using UnityEditor;
- #endif
- namespace AC
- {
- [System.Serializable]
- public class ActionControllerInputMethod : Action
- {
- // Declare variables here
- public ActionControllerInputMethod()
- {
- this.isDisplayed = true;
- category = ActionCategory.Custom;
- title = "KB&C Input Method";
- description = "Keyboard or Controller input method";
- }
- override public float Run()
- {
- KickStarter.settingsManager.inputMethod = InputMethod.KeyboardOrController;
- KickStarter.settingsManager.hotspotDetection = HotspotDetection.PlayerVicinity;
- KickStarter.settingsManager.hideLockedCursor = true;
- /*
- * The above settings depend on the requirements of your
- * project and can be customized according to your needs.
- */
- if (!isRunning)
- {
- isRunning = true;
- return defaultPauseTime;
- }
- else
- {
- isRunning = false;
- return 0f;
- }
- }
- #if UNITY_EDITOR
- override public void ShowGUI()
- {
- // Action-specific Inspector GUI code here
- AfterRunningOption();
- }
- public override string SetLabel()
- {
- // Return a string used to describe the specific action's job.
- string labelAdd = "";
- return labelAdd;
- }
- #endif
- }
- }
Add Comment
Please, Sign In to add comment