// Use this for initialization void Start() { linePoints = new List <Vector3>(); drillTrailPoints = new List <Vector3>(); pickPointDelay = 0; groundlevel = drawPointer.position.y; minx = leftBoundary.position.x; maxx = rightBoundary.position.x; bottomlevel = bottomBoundary.position.y; horizontalLeftBoundary = OilRig.position; horizontalLeftBoundary.x = leftBoundary.position.x; horizontalRightBoundary = OilRig.position; horizontalRightBoundary.x = rightBoundary.position.x; curMoveTarget = 0; remainTime = PlanningTime; TimeUI.SetActive(false); DrillUI.SetActive(false); inviewLog = false; drawButtonPressed = false; eraseButtonPressed = false; lineLength = 0; offset = 0; lineMat = trailPath.renderer.material; drawPointer.gameObject.SetActive(true); pencil = drawPointer.GetChild(0).gameObject; pencAnim = pencil.GetComponentInChildren <Animator> (); orgDrawPosition = drawPointer.position; orgDrawRotation = drawPointer.rotation; drillObject = Drill.GetChild(0); HPBar.SetActive(false); Drill.gameObject.SetActive(false); //BatteryFillmentSprite = BatteryLevel.GetComponentInChildren<SpriteRenderer> (); scoreDisp.gameObject.SetActive(false); //BatteryCtrl = Battery.GetComponent<Stage3BatteryCtrl> (); batteryCtrl = Battery.GetComponent <BatteryControl> (); Battery.SetActive(false); HintBox.SetActive(false); StartCoroutine(UpdateBGM(BGMCtrl.instance.ChangeBGM(3))); CurMarkers = new GameObject("Markers"); optionBox.CloseOptionBox(); informBox.gameObject.SetActive(false); currentFinal = 0; instance = this; }
void Awake() { instance = this; planStage = PlanStage.Loading; }