Ejemplo n.º 1
0
 void Start()
 {
     // Get the rigidbody component
     rb        = GetComponent <Rigidbody2D>();
     slopes    = GetComponent <Slopes>();
     wallSlide = GetComponent <WallSlide>();
     wallClimb = GetComponent <WallClimb>();
 }
Ejemplo n.º 2
0
 void Start()
 {
     // Get the components
     animationStateMachine = GetComponent <AnimationStateMachine>();
     playerController      = GetComponent <PlayerController>();
     coll      = GetComponent <Collisions>();
     wallSlide = GetComponent <WallSlide>();
     wallClimb = GetComponent <WallClimb>();
 }
Ejemplo n.º 3
0
 void Start()
 {
     // Get the components
     animator         = GetComponentInChildren <Animator>();
     playerController = GetComponent <PlayerController>();
     wallSlide        = GetComponent <WallSlide>();
     wallClimb        = GetComponent <WallClimb>();
     wallJump         = GetComponent <WallJump>();
     ledgeGrab        = GetComponent <LedgeGrab>();
     dash             = GetComponent <Dash>();
     betterJumping    = GetComponent <BetterJumping>();
     knockBack        = GetComponent <Knockback>();
 }
Ejemplo n.º 4
0
 void Awake()
 {
     playerInput              = GetComponent <InputController>();
     wallClimb                = GetComponent <WallClimb>();
     anim                     = animator.GetComponent <Animator>();
     playerRB                 = GetComponent <Rigidbody>();
     playerRB.isKinematic     = false;
     playerRB.velocity        = Vector3.zero;
     playerRB.angularVelocity = Vector3.zero;
     facingDirection          = mainCam.transform.forward;
     playerRB.freezeRotation  = true;
     falling                  = false;
     Sprint();
 }
Ejemplo n.º 5
0
    void Start()
    {
        // Get the wall climb component
        wallClimb = GetComponent <WallClimb>();

        // Get the collisions component
        coll = GetComponent <Collisions>();

        // Get the rigidbody component
        rb = GetComponent <Rigidbody2D>();

        // Get the playerController component
        playerController = GetComponent <PlayerController>();
    }
Ejemplo n.º 6
0
    void Start()
    {
        // Get the collisions component
        coll = GetComponent <Collisions>();
        // Get the rigidbody the script is attached to
        rb = GetComponent <Rigidbody2D>();
        // Get the dash component
        dash = GetComponent <Dash>();
        // Get the wall climb component
        wallClimb = GetComponent <WallClimb>();
        // Get the wall jump component
        wallJump = GetComponent <WallJump>();
        // Get the coyote time component
        coyoteTime = GetComponent <CoyoteTime>();

        // Set the gravity scale
        rb.gravityScale = gravityMultiplier;
    }
Ejemplo n.º 7
0
    void Start()
    {
        // Get the collisions component
        coll = GetComponent <Collisions>();
        // Get the betterJumping component
        betterJumping = GetComponent <BetterJumping>();
        // Get the rigidbody component
        rb = GetComponent <Rigidbody2D>();
        // Get the playerController component
        playerController = GetComponent <PlayerController>();
        // Get the wall climb component
        wallClimb = GetComponent <WallClimb>();
        // Set can grab ledge to false
        canGrabLedge = false;

        // Hijack the wall climb ledge grab
        wallClimb.disableLedgeGrab = hijackControls;
    }
Ejemplo n.º 8
0
    void Start()
    {
        wc = GetComponent <WallClimb> ();
//        GameObject upTextGO = GameObject.Find("UpgradeText");
//        upgradeText = upTextGO.GetComponent<Text>();

        if (GetComponent <PlatformerCharacter2D>() != null)
        {
            isPlayer = true;
            Debug.Log("Setting up player for to gain things");
            for (int i = 0; i < PlayerPrefs.GetInt("claws"); ++i)
            {
                Upgrade(BodyPart.Claws);
            }
            for (int i = 0; i < PlayerPrefs.GetInt("feet"); ++i)
            {
                Upgrade(BodyPart.Feet);
            }
            for (int i = 0; i < PlayerPrefs.GetInt("legs"); ++i)
            {
                Upgrade(BodyPart.Legs);
            }
            for (int i = 0; i < PlayerPrefs.GetInt("wings"); ++i)
            {
                Upgrade(BodyPart.Wings);
            }
            for (int i = 0; i < PlayerPrefs.GetInt("wingspan"); ++i)
            {
                Upgrade(BodyPart.WingSpan);
            }
            for (int i = 0; i < PlayerPrefs.GetInt("eyes"); ++i)
            {
                Upgrade(BodyPart.Eyes);
            }
            Debug.Log("Done setting up player");
        }
    }
Ejemplo n.º 9
0
 void Start()
 {
     gripScript   = player.GetComponent <GripEdge>();
     climbScript  = player.GetComponent <WallClimb>();
     playerScript = player.GetComponent <PlayerScript>();
 }
Ejemplo n.º 10
0
 void Start()
 {
     _rigidbody2D = GetComponent <Rigidbody2D>();
     _wallClimb   = GetComponent <WallClimb>();
 }