// Use this for initialization
 void Start()
 {
     //playerLocomotion = GetComponent<PlayerLocomotion> ();
     playerInput = GetComponent <PlayerInput> ();
     levelBar    = FindObjectOfType <LevelUpBar> ();
     audioclip   = GetComponent <AudioSource> ();
 }
示例#2
0
    // Use this for initialization
    void Start()
    {
        rigidbody2d            = GetComponent <Rigidbody2D> ();
        playerInput            = GetComponent <PlayerInput> ();
        raycastCollisionChecks = GetComponent <RaycastCollisionChecks> ();
        levelBar  = FindObjectOfType <LevelUpBar> ();
        audioclip = GetComponent <AudioSource> ();

        SetupMoveAndJumpSpeed();
    }
示例#3
0
 // Use this for initialization
 void Start()
 {
     rb          = GetComponent <Rigidbody2D> ();
     pl          = FindObjectOfType <PlayerLocomotion> ();
     audioclip   = GetComponent <AudioSource> ();
     levelBar    = FindObjectOfType <LevelUpBar> ();
     rb.velocity = new Vector2(Random.Range(minXSpeed, maxXSpeed), Random.Range(minYSpeed, maxYSpeed));
     xSpeed      = rb.velocity.x;
     ySpeed      = rb.velocity.y;
 }
示例#4
0
 // Use this for initialization
 void Start()
 {
     levelBar  = FindObjectOfType <LevelUpBar> ();
     audioclip = GetComponent <AudioSource> ();
 }