Exemplo n.º 1
0
        /// <summary>
        /// Position this renderable on the city grid
        /// </summary>
        /// <param name="plotx">X Position in plot coords of this instance</param>
        /// <param name="ploty">Y Position in plot coords of this instance</param>
        public virtual void SetPosition(int plotx, int ploty)
        {
            PlotX = plotx;
            PlotY = ploty;
            Vector3 plotcenter = CityManager.GetPlotCenter(plotx, ploty);

            if (node != null)
            {
                node.SetPosition(plotcenter.x, plotcenter.y, plotcenter.z);
            }
        }
Exemplo n.º 2
0
        public override void SetPosition(int plotx, int ploty)
        {
            base.SetPosition(plotx, ploty);
            Vector3 plotcenter = CityManager.GetPlotCenter(plotx, ploty);

            if (zoneNode != null)
            {
                zoneNode.SetPosition(plotcenter.x, plotcenter.y + 1, plotcenter.z);
            }
            if (selectionBoxNode != null)
            {
                selectionBoxNode.SetPosition(plotcenter.x, plotcenter.y, plotcenter.z);
            }
        }