Ejemplo n.º 1
0
    private void Start()
    {
        SceneManager.sceneLoaded += InitGame;
        assigner = GetComponent <ControllerListener>();

        assigner.OnPlayerEvent.AddListener(this.OnPlayer);
    }
Ejemplo n.º 2
0
        //// 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>();
        }
Ejemplo n.º 4
0
    // 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");
    }
Ejemplo n.º 5
0
 public MainWindow()
 {
     InitializeComponent();
     ControllerListener CL = new ControllerListener();
 }
Ejemplo n.º 6
0
    // 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);
                }
            }
        }
    }