Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     rb      = GetComponent <Rigidbody2D> ();
     anim    = GetComponent <Animator> ();
     minpute = GetComponent <MainInputManager> ();
     gch     = GetComponentInChildren <GroundCheckerScript> ();
     sprit   = GetComponent <SpriteRenderer> ();
     speed   = 10;
 }
Ejemplo n.º 2
0
    public bool slowSlide;              //is wall sliding very slow (overrides dafault behaviour)

    // Use this for initialization
    void Start()
    {
        //get references for used components
        //spriteRenderer = GetComponent<SpriteRenderer>();
        rigidbody2d   = GetComponent <Rigidbody2D>();
        groundChecker = GetComponent <GroundCheckerScript>();
        wallChecker   = GetComponent <WallCheckerScript>();
        animHandler   = GetComponent <PlayerAnimHandler>();
        sounds        = GetComponent <PlayerSoundEffectsScript>();

        PowerUpHolderScript.instance.SetPowerUpChangeListener(this);
        OnPowerUpsChanged();
        //make an animation controller decider to handle which controller to use
        //run it in onpowerUpsChanged...
    }