// Start is called before the first frame update void Start() { thisCollider = GetComponent <Collider2D>(); walkScript = GetComponent <WalkOnPlatForm>(); //walkScript = this.gameObject.GetComponent<WalkOnPlatForm>(); rb = GetComponent <Rigidbody2D>(); }
// Start is called before the first frame update void Start() { catSounds = GetComponents <AudioSource>(); catDie = catSounds[0]; gameManagerObject = GameObject.Find("GameManager"); gm = gameManagerObject.GetComponent <GameManager>(); thisCollider = GetComponent <BoxCollider2D>(); walkScript = GetComponent <WalkOnPlatForm>(); Rigidbody2D rb = GetComponent <Rigidbody2D>(); catSpriteRender = GetComponent <SpriteRenderer>(); }