// Use this for initialization void Start() { parentPart = transform.parent.GetComponent <TetrisPart>(); if (transform.childCount > 0) { childWeapon = transform.GetChild(0).gameObject; } }
// Use this for initialization void Start() { parentPart = transform.parent.GetComponent <TetrisPart>(); halfBlockSideLength = GetComponent <SpriteRenderer>().bounds.size.x * 0.5f; if (transform.childCount > 0) { childWeapon = transform.GetChild(0).gameObject; } moveLayerMask = LayerMask.GetMask("Player"); //moveLayerMask = LayerMask.NameToLayer("Player"); parentBlocks = new TetrisBlock[4]; childBlocks = new TetrisBlock[4]; }