Example #1
0
 public void SetUp(BuildingInfo info, Transform parent)
 {
     this.info = info;
     this.transform.position = GameManager3D.XYtoVector3(info.x, info.y);
     this.meshRenderer.materials[1].color = Data.inst.colorList[info.colorCode];
     this.meshFilter.mesh = Data.inst.cityInfos[info.buildingCode].mesh;
     this.transform.SetParent(parent);
 }
Example #2
0
    public void BuildCastle3D()
    {
        Vector2 v2 = GameManager3D.Vector3ToXY(transform.position);

        info.x = (int)v2.x;
        info.y = (int)v2.y;

        mapBuilder.BuildCastle3D(info);

        BuildingInfo newInfo = new BuildingInfo(info.buildingCode, info.colorCode, info.x, info.y);

        MakeMapManager.inst.infoList.Add(newInfo);


        /*
         *      if(this.bc2d != null)
         *      {
         *              BoxCollider2D bc2d = a.transform.GetComponent<BoxCollider2D>();
         *              bc2d.offset   = this.bc2d.offset;
         *              bc2d.size     = this.bc2d.size;
         *      }
         */
    }
Example #3
0
 public override void SetUp(int x, int y, int typeID, Team team)
 {
     base.SetUp(x, y, typeID, team);
     this.meshFilter.mesh    = Data.inst.cityInfos[typeID].mesh;
     this.transform.position = GameManager3D.XYtoVector3(x, y);
 }
Example #4
0
 void Awake()
 {
     GameManager.inst     = this;
     GameManager3D.inst3D = this;
 }