void Awake() { animator = GetComponent<Animator>(); characterController2D = GetComponent<CharacterController2D>(); characterController2D.onControllerCollidedEvent += onControllerCollider; input = GetComponent<AbstractInput> (); }
void Awake() { var inputRoot = transform.Find("InputRoot"); var hudInputManager = inputRoot.transform.Find("HUD").GetComponent <HUDInput>(); var keyboardInputManager = inputRoot.transform.Find("Keyboard").GetComponent <VirtualInput>(); InputManager = (inputDevice == InputDevice.HUD) ? hudInputManager as AbstractInput : keyboardInputManager as AbstractInput; }
public AbstractScene(SceneManager manager, GameObjectFactory <string> resourceFactory, GameObjectFinder finder, AbstractInput input) { sceneManager = manager; this.resourceFactory = resourceFactory; this.gameObjectFinder = finder; this.input = input; completed = false; permitUnloadResources = true; camera = Camera.main; }
public AbstractScene(SceneManager manager, GameObjectFactory<string> resourceFactory, GameObjectFinder finder, AbstractInput input) { sceneManager = manager; this.resourceFactory = resourceFactory; this.gameObjectFinder = finder; this.input = input; completed = false; permitUnloadResources = true; camera = Camera.main; }
public SpeechBubble(Camera camera, float leftToRightSwitchOverPosition) { this.camera = camera; this.leftToRightSwitchOverPosition = leftToRightSwitchOverPosition; speechBubble = Sprite.create("SceneFour/bubble"); speechBubbleLeft = Sprite.create("SceneFour/bubble_1"); speechBubbleRight = Sprite.create("SceneFour/bubble_2"); speechBubbleRight.visible(false); speechBubble.setWorldPosition(-80f, 60f, -1f); speechBubbleLeft.setWorldPosition(-55f, 50f, -5f); speechBubbleRight.setWorldPosition(-55f, 50f, -5f); speechBubbleRight.transform.Rotate(Vector3.forward * 5); input = new UnityInput(); dragger = new Dragger(input, speechBubble); }
void Awake() { currentInput = touchInput; // if (Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.WindowsEditor) // { // currentInput = touchInput; // } // else if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) // { // currentInput = touchInput; // } // else // { // currentInput = hardwareInput; // } }
public static void Init() { if (InputSystem.TKeyboard != null || TryLoadModule("Unity.InputSystem", InputSystem.TKeyboard)) { inputModule = new InputSystem(); } else if (LegacyInput.TInput != null || TryLoadModule("UnityEngine.InputLegacyModule", LegacyInput.TInput)) { inputModule = new LegacyInput(); } if (inputModule == null) { ExplorerCore.LogWarning("Could not find any Input module!"); inputModule = new NoInput(); } inputModule.Init(); bool TryLoadModule(string dll, Type check) => ReflectionHelpers.LoadModule(dll) && check != null; }
public TouchSensor(AbstractInput input, GameObjectFinder gameObjectFinder) { this.input = input; this.gameObjectFinder = gameObjectFinder; }
void Start() { PresentData.Instance.LevelInit.OnLoadComplete += OnLoadComplete; inputManager = GameData.Instance.InputManager; }
// Start is called before the first frame update private void Start() { _rigidbody = GetComponent <Rigidbody>(); _input = MainController.Instance.GetInput; }
public void SetControllingAbstractInput(AbstractInput controllingInput) { abstractInput = controllingInput; }
public Dragger(AbstractInput input, Sprite sprite) { this.input = input; this.sprite = sprite; this.startPosition = sprite.getScreenPosition(); }
// Use this for initialization void Start() { input = new XboxInput ((XboxController)playerIndex); ballMaterial = GetComponent<Renderer> ().material; initialColor = ballMaterial.color; arrow.SetActive (false); // stateMachine = new StateMachine (this); stateMachine.SetState (new IdleState ()); // direction = new Vector3 (0, 0, 0); // rb = GetComponent<Rigidbody> (); startPos = transform.position; // shootLock = new TimeDurationLock (1); }