Beispiel #1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Beispiel #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...
    }