Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     drillerButton = GameObject.FindWithTag("DrillerButton").GetComponent <DrlBtnScr>();
     blockCreation = GameObject.FindWithTag("Background").GetComponent <UserBlockCreate>();
     block1Button  = GameObject.FindWithTag("Block1Button").GetComponent <Blk1BtnScr>();
     block2Button  = GameObject.FindWithTag("Block2Button").GetComponent <Blk2BtnScr> ();
 }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        hammerButton  = GameObject.FindWithTag("HammerButton").GetComponent <HamrBtnScr>();
        drillerButton = GameObject.FindWithTag("DrillerButton").GetComponent <DrlBtnScr> ();
        block1Button  = GameObject.FindWithTag("Block1Button").GetComponent <Blk1BtnScr>();
        block2Button  = GameObject.FindWithTag("Block2Button").GetComponent <Blk2BtnScr>();

        spriteRenderer = renderer as SpriteRenderer;
    }
    // Use this for initialization
    void Start()
    {
        Physics2D.IgnoreLayerCollision(12, 11);
        Physics2D.IgnoreLayerCollision(12, 10);
        Physics2D.IgnoreLayerCollision(12, 9);
        Physics2D.IgnoreLayerCollision(12, 8);

        spriteRenderer = renderer as SpriteRenderer;

        block1Button    = GameObject.FindWithTag("Block1Button").GetComponent <Blk1BtnScr> ();
        block2Highlight = GameObject.Find("Block2ActiveHighlight");
        block2Highlight.SetActive(false);
    }