private void Start() { SceneManager.sceneLoaded += InitGame; assigner = GetComponent <ControllerListener>(); assigner.OnPlayerEvent.AddListener(this.OnPlayer); }
//// LISTEN THREAD //// void LoadControllerListener() { ControllerListener contollerListener = new ControllerListener(this, serialPort); contollerListener.start(); }
protected override void RegiserService() { var controllerListener = new ControllerListener(); base.SubjectUnderTest.ListenManager.Register(controllerListener); base.ServiceManager.ServiceDescriptorResolved += controllerListener.OnServiceDescriptorResolved; base.ServiceManager.OperationDescriptorResolved += controllerListener.OnOperationDescriptorResolved; ServiceRegistry.Register <CalculteService>(); }
// Use this for initialization void Start() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(this); } listener = new ControllerListener(); controller = new Controller(); controller.AddListener(listener); print("GameplayInputHandler Start"); }
public MainWindow() { InitializeComponent(); ControllerListener CL = new ControllerListener(); }
// Use this for initialization void Start() { if (instance == null) { instance = this; //DontDestroyOnLoad(this); } else if (instance != this) { Destroy(this); } //V3 image = GameObject.Find("Pointer"); image.SetActive(false); listener = new ControllerListener(); controller = new Controller(); controller.AddListener(listener); pox = 0; poy = 0; //V2 if (SceneManager.GetActiveScene().name == "SongSelection") { print("InputHandler Start"); textPointer = GameObject.Find("TextPointer").GetComponent <Text>(); textTarget = GameObject.Find("TextTarget").GetComponent <Text>(); indexFingerX = 0; indexFingerY = 0; isSwiping = false; isCircling = false; isKeyTapping = false; isScreenTapping = false; swipeVectorX = 0; swipeLeftward = false; swipeRightward = false; } else if (SceneManager.GetActiveScene().name == "Gameplay") { //Gameplay textTool = GameObject.Find("TextTool"); pointer = GameObject.Find("Pointer"); foreach (GameObject go in Resources.FindObjectsOfTypeAll <GameObject>()) { if (go.name == "Drumstick0") { drumstick0 = go; drumstick0.SetActive(false); } else if (go.name == "Drumstick1") { drumstick1 = go; drumstick1.SetActive(false); } } } }