private void InitInput()
    {
        m_oInput = InputFactory.GetInput(m_eInputSource);

        if (m_oInput != null)
        {
            m_oInput.Init();

            m_oInput.Activate(JumpDetecet, ShootDetected);
        }
    }
Esempio n. 2
0
    private void InitInput()
    {
        m_oInput = InputFactory.GetInput(m_eInputSource);

        if (m_oInput != null)
        {
            m_oInput.Init();

            m_oInput.Activate(PrimaryDetecet, SecondaryDetected, SwitchPlayerDetected, MoveLeftDetected, MoveRightDetected, MoveUpDetected, MoveDownDetected, GetObjectDetected, UseObjectDetected, DropObjectDetected, InfoDetected);
        }
    }
Esempio n. 3
0
    private void InitInput()
    {
        m_oInput = InputFactory.GetInput();

        if (m_oInput != null)
        {
            m_oInput.Init(m_paintTable);

            m_oInput.Activate(
                OnSlideDetected
                );
        }
    }
Esempio n. 4
0
        // Use this for initialization
        protected void Start()
        {
            activeCharacters = new List <MainCharacter>();
            playersCount++;
            coinController = new CharacterCoinController();
            levelGenerator = GameObject.FindObjectOfType <LevelGenerator>();
            input          = InputFactory.GetInput(playersCount, mobileInput);
            character      = GetComponentInParent <MainCharacter>();
            activeCharacters.Add(character);

            //FIXME wtf
            cameraController = character.GetComponentInChildren <CharacterCameraController>();
        }
Esempio n. 5
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            graphics.PreferredBackBufferWidth  = _renderedWidth;
            graphics.PreferredBackBufferHeight = _renderedHeight;
            graphics.ApplyChanges();

            IsMouseVisible = true;

            renderer.Initialize(GraphicsDevice, _gameWorldWidth, _gameWorldHeight, _discs);

            _input = InputFactory.GetInput(_renderedWidth / _gameWorldWidth, _renderedHeight / _gameWorldHeight);

            _discs.Add(new Disc(5, new Vector2(_gameWorldWidth / 2, _gameWorldHeight / 2), new Vector2(.5f, 1)));
            _discs.Add(new Disc(5, new Vector2(_gameWorldWidth / 4, _gameWorldHeight / 4), new Vector2(1, 1.5f)));

            base.Initialize();
        }
Esempio n. 6
0
    private void InitInput()
    {
        m_oInput = InputFactory.GetInput(m_eInputSource);

        if (m_oInput != null)
        {
            m_oInput.Init();

            m_oInput.Activate(
                OnSlideToRightDetc,
                OnSlideToLeftDect,
                OnSlideToTopDetc,
                OnSlideToBottomDetc,
                OnSingleClickDetc,
                OnCLickContinuosDetc
                );
        }
    }
Esempio n. 7
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            base.Initialize();

            input = InputFactory.GetInput();

            TextDisplay textDisplay = new TextDisplay();

            textDisplay.Initialize(Content.Load <SpriteFont>("BlackJackFont"));

            CardDisplay cardDisplay = new CardDisplay();

            cardDisplay.Initialize(Content.Load <Texture2D>("Card-Faces"), Content.Load <Texture2D>("Card-Back"));

            ChipDisplay chipDisplay = new ChipDisplay();

            chipDisplay.Initialize(Content.Load <Texture2D>("Chips"), textDisplay);

            _table = new Table();
            _table.Initialize(input, GraphicsDevice.Viewport.Height, GraphicsDevice.Viewport.Width, cardDisplay, textDisplay, chipDisplay);
        }