// Use this for initialization void Start() { colliderDiagonal = GetComponent <Collider2D>(); spriteRendererParent = GetComponentInParent <SpriteRenderer>(); goombaController = goombaScript.GetComponent <GoombaController>(); }
// Use this for initialization void Start() { spriteRendererParent = GetComponentInParent <SpriteRenderer>(); colliderSide = GetComponent <Collider2D>(); goombaController = goombaScript.GetComponent <GoombaController>(); colliderSide.enabled = true; }
void Start() { animator = GetComponentInParent <Animator>(); goomba = GetComponentInParent <Rigidbody2D>(); spriteRendererParent = GetComponentInParent <SpriteRenderer>(); goombaController = goombaScript.GetComponent <GoombaController>(); colliderTop = GetComponent <Collider2D>(); }