Пример #1
0
    // Use this for initialization
    void Start()
    {
        colliderDiagonal = GetComponent <Collider2D>();

        spriteRendererParent = GetComponentInParent <SpriteRenderer>();

        goombaController = goombaScript.GetComponent <GoombaController>();
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        spriteRendererParent = GetComponentInParent <SpriteRenderer>();
        colliderSide         = GetComponent <Collider2D>();

        goombaController = goombaScript.GetComponent <GoombaController>();

        colliderSide.enabled = true;
    }
Пример #3
0
    void Start()
    {
        animator             = GetComponentInParent <Animator>();
        goomba               = GetComponentInParent <Rigidbody2D>();
        spriteRendererParent = GetComponentInParent <SpriteRenderer>();

        goombaController = goombaScript.GetComponent <GoombaController>();

        colliderTop = GetComponent <Collider2D>();
    }