Exemplo n.º 1
0
    // 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;
    }
Exemplo n.º 2
0
    void Awake()
    {
        if (Battery == null)
        {
            DontDestroyOnLoad(gameObject);
            Battery = this;
        }

        else if (Battery != this)
        {
            Destroy(gameObject);
        }
    }
Exemplo n.º 3
0
        } // Init0()

        public bool Init1 ()
        {
            batteries = new BatteryControl(this);
            reactors = new ReactorControl(this);
            return true;
        } // Init1()