// Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); groundMask = LayerMask.NameToLayer("ground"); benjiSounds = GetComponent <BenjiSounds>(); spriteRenderer = GetComponent <SpriteRenderer>(); }
// Start is called before the first frame update void Start() { Time.timeScale = 0; isGameOver = false; benjiSounds = benji.GetComponent <BenjiSounds>(); benjiAnim = benji.GetComponent <Animator>(); initialMessagePanel.SetActive(true); sounds = GetComponents <AudioSource>(); catdie = sounds[0]; benjibark = sounds[1]; gameOverSound = sounds[2]; barkCountText.text = barkCount.ToString(); backgroundMusic = GameObject.Find("BackgroundMusicLVL1").GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody2D>(); benjiSounds = GetComponent <BenjiSounds>(); }