private void Start() { _thisRect = this.GetComponent <RectTransform>(); _canvas = GetComponentInParent <Canvas>(); jg = GetComponentInParent <JigsawGenerator>(); IsReachAStandard = ReachAStandard; }
public JigsawTileParent parentTile; //吸附后父物体对象 void Start() { _canvas = GetComponentInParent <Canvas>(); _thisRect = GetComponent <RectTransform>(); _bgRect = this.transform.parent.parent.Find("bg").transform as RectTransform; min_x = _bgRect.transform.Find("left").gameObject; max_x = _bgRect.transform.Find("right").gameObject; min_y = _bgRect.transform.Find("down").gameObject; max_y = _bgRect.transform.Find("up").gameObject; jg = GetComponentInParent <JigsawGenerator>(); }