Esempio n. 1
0
    private void Start()
    {
        _question    = _gameController.GetComponent <GameManagerController>();
        _pr          = _playerRight.GetComponent <PlayerRight>();
        _stateRemote = _canvasController.GetComponent <CanvasController>();


        _boatBody = this.gameObject.GetComponent <Rigidbody>();

        _audioSource = GetComponent <AudioSource>();
    }
Esempio n. 2
0
    /// <summary>
    /// Start method
    /// </summary>
    private void Start()
    {
        _pl          = _playerLeft.GetComponent <playerLeft>();
        _pr          = _playerRight.GetComponent <PlayerRight>();
        _stateRemote = _canvasController.GetComponent <CanvasController>();

        _questions = new Question[31];
        InitialiseQuestions();
        SwapQuestions(_questions);
        //PrintToConsole();
        SetQuestionTextFields();
    }
Esempio n. 3
0
 //constructor
 public Player(PyramidPanic game, Vector2 position, float speed)
 {
     this.game = game;
     this.position = position;
     this.texture = this.game.Content.Load<Texture2D>(@"PlayScene\player\Explorer");
     this.rectangle = new Rectangle((int)position.X + 16, (int)position.Y + 16, this.texture.Width / 4, this.texture.Height);
     this.collisionRec = new Rectangle((int)position.X, (int)position.Y, 32, 32);
     this.speed = speed;
     this.playerLeft = new PlayerLeft(this);
     this.playerRight = new PlayerRight(this);
     this.playerDown = new PlayerDown(this);
     this.playerUp = new PlayerUp(this);
     this.playerIdle = new PlayerIdle(this);
     this.state = new PlayerIdle(this,0);
 }