Exemple #1
0
    private void Start()
    {
        playAudio = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <GameControllerPlayAudio>();

        speed      = 0f;
        rigid      = GetComponent <Rigidbody2D>();
        anim       = GetComponent <Animator>();
        sliding    = false;
        falling    = false;
        jump       = false;
        jumpCharge = false;
    }
Exemple #2
0
    private void Start()
    {
        playAudio = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <GameControllerPlayAudio>();

        jumpClip  = (AudioClip)AssetDatabase.LoadAssetAtPath(Paths.jumpAudio, typeof(AudioClip));
        landClip  = (AudioClip)AssetDatabase.LoadAssetAtPath(Paths.landAudio, typeof(AudioClip));
        appleClip = (AudioClip)AssetDatabase.LoadAssetAtPath(Paths.appleAudio, typeof(AudioClip));

        speed      = 0f;
        rigid      = GetComponent <Rigidbody2D>();
        anim       = GetComponent <Animator>();
        sliding    = false;
        falling    = false;
        jump       = false;
        jumpCharge = false;
    }