protected override void UpdatePostion() { go += Time.deltaTime * GameManager.ARMY_SPEED * GameManager.inst.gameSpeed; Vector2 pos = Vector2.MoveTowards(startPos, endPos, go); transform.position = GameManager3D.XYtoVector3((int)pos.x, (int)pos.y); }
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); }
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); }