private void Start() { createdColliders = new List <PolygonCollider2D>(); collectedColliders = new List <PolygonCollider2D>(); puzzleMaster = gameObject.GetComponentInParent <PuzzleMaster>(); Smooth = puzzleMaster.smooth; TiltAngle = puzzleMaster.tiltAngle; puzzle = GetComponentInParent <Puzzle>(); spriteRenderer = GetComponent <SpriteRenderer>(); collider = GetComponent <PolygonCollider2D>(); rigidbody = GetComponent <Rigidbody2D>(); collectedColliders.Add(collider); plane = new Plane(Vector3.forward, base.transform.position); var parent = transform.parent.position; origin = new Vector3(parent.x, parent.y, parent.z); lastPosition = transform.position; spriteRenderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.On; if (IsCloseEnoughToOrigin()) { TriggerPlacementNoSound(); } }
private void Awake() { instance = this; //Logger.I.LogInitialized(this); }