void StartAnchor() { bool addEvents = false; foreach (Collider2D collider in anchorsList) { if (collider != null) { addEvents = true; } } if (addEvents == false) { return; } Slicer2D slicer = GetComponent <Slicer2D> (); if (slicer != null) { slicer.AddResultEvent(OnAnchorSliceResult); slicer.AddEvent(OnAnchorSlice); } foreach (Collider2D collider in anchorsList) { anchorPolygons.Add(Polygon2DList.CreateFromGameObject(collider.gameObject)[0]); anchorColliders.Add(collider); } }
void Start() { bool addEvents = false; foreach (Collider2D collider in anchorColliders) { addEvents = true; } if (addEvents == false) { return; } Slicer2D slicer = GetComponent <Slicer2D> (); if (slicer != null) { slicer.AddResultEvent(OnSliceResult); slicer.AddEvent(OnSlice); } foreach (Collider2D collider in anchorColliders) { polygons.Add(Polygon2D.CreateFromCollider(collider.gameObject)); colliders.Add(collider); } }
void Start() { Slicer2D slicer = GetComponent <Slicer2D>(); slicer.AddEvent(OnSlice); slicer.AddResultEvent(AfterSlice); }
void Awake() { Slicer2D slicer = GetComponent <Slicer2D> (); slicer.AddResultEvent(OnSliceResult); polygon = Polygon.CreateFromCollider(connector); }
// Use this for initialization void Start() { Slicer2D slicer = GetComponent <Slicer2D>(); if (slicer != null) { slicer.AddResultEvent(SliceEvent); } }
void Start() { Slicer2D slicer = GetComponent <Slicer2D> (); slicer.AddResultEvent(OnSlice); body2D = GetComponent <Rigidbody2D> (); GetJoint(); }
void Start() { Slicer2D slicer = GetComponent <Slicer2D>(); slicer.AddResultEvent(SlicerEvent); if (timer == null) { timer = TimerHelper.Create(); } }
void Start() { Slicer2D slicer = GetComponent <Slicer2D>(); if (slicer != null) { slicer.AddResultEvent(SliceEvent); } posZ = transform.position.z - 0.1f; }
void Start() { if (anchorCollider == null) { return; } Slicer2D slicer = GetComponent <Slicer2D> (); if (slicer != null) { slicer.AddResultEvent(OnSliceResult); slicer.AddEvent(OnSlice); } polygon = Polygon.CreateFromCollider(anchorCollider.gameObject); }
void Start() { Slicer2D slicer = GetComponent <Slicer2D>(); slicer.AddResultEvent(SliceEvent); }