private void Start()
 {
     scoreScript  = FindObjectOfType <ScoreScript>();
     ThisCollider = GetComponent <Collider2D>();
     Shakey       = FindObjectOfType <ScreenShake>();
     BGTimer      = FindObjectOfType <BackgroundTimingScript>();
     MainText     = FindObjectOfType <ScrollingScript>();
     player       = FindObjectOfType <AnimatiePlayer>();
     Controls     = FindObjectOfType <TouchControls>();
 }
Beispiel #2
0
 public Player(Texture2D text, IInputReader reader)
 {
     postieLevel         = new PlayerPosition();
     frames              = new FramesPlayer();
     playerTexture       = text;
     animatie            = new AnimatiePlayer(frames);
     Position            = postieLevel.Postions[GameState.level];
     this.inputReader    = reader;
     moveCommand         = new MoveCommand();
     _collisionRectangle = new Rectangle((int)Position.X, (int)Position.Y, 80, 120);
 }