void FixedUpdate() { if ((Mathf.Abs(this.gameObject.transform.localPosition.x) < breakPoint) && this.gameObject.transform.localPosition.y < 0f) { myType = platType.none; } else if (this.gameObject.transform.localPosition.x > breakPoint) { myType = platType.right; } else if (this.gameObject.transform.localPosition.x < (breakPoint * -1f)) { myType = platType.left; } else { myType = platType.left; } }
void FixedUpdate() { if (Mathf.Abs(this.gameObject.transform.localPosition.x) < breakPoint) { myType = platType.none; } if (this.gameObject.transform.localPosition.x > breakPoint) { myType = platType.right; } if (this.gameObject.transform.localPosition.x < (breakPoint * -1)) { myType = platType.left; } }