예제 #1
0
파일: Way.cs 프로젝트: Cdrix/SM
 void InitializeBigBoxPrev()
 {
     if (verticBigBox == null || horizBigBox == null)
     {
         verticBigBox = (BigBoxPrev)CreatePlane.CreatePlan(Root.bigBoxPrev, Root.matGreenSel2);
         verticBigBox.transform.name = "verticBigBox:" + MyId;
         horizBigBox = (BigBoxPrev)CreatePlane.CreatePlan(Root.bigBoxPrev, Root.matGreenSel2);
         horizBigBox.transform.name = "horizBigBox:" + MyId;
     }
 }
예제 #2
0
    // Use this for initialization
    private void Start()
    {
        base.Start();

        //if is not position fixed alredy we create the preview
        //when is Position Fixed already here mean that was loaded from file
        if (!PositionFixed)
        {
            farmPrev = (BigBoxPrev)CreatePlane.CreatePlan(Root.bigBoxPrev, Root.matGreenSel2);
            farmPrev.transform.name = "Farm Preview: " + MyId;
        }

        if (HType == H.Road)
        {
            maxSizeOfFarm = 500;
        }
    }
예제 #3
0
파일: ForSaleRegionGO.cs 프로젝트: Cdrix/SM
    void Start()
    {
        _animator = gameObject.GetComponent <Animator>();
        _hover    = GetChildCalled("Hover");
        _hover.gameObject.SetActive(false);

        var poly = U2D.FromRectToPoly(Region);

        buildingPrev = (BigBoxPrev)CreatePlane.CreatePlan(Root.bigBoxPrev, Root.dashedLinedSquare, container: transform);
        buildingPrev.UpdatePos(poly, .25f);
        buildingPrev.transform.position = U2D.FromV2ToV3(Region.center);

        //MeshController.CrystalManager1.CrystalRegions[Index].StartWithAudioReport();
        Name  = "Buy region";
        HType = H.BuyRegion;

        transform.position += new Vector3(0, 10000, 0);
    }