Ejemplo n.º 1
0
        public IVolume AddPlan(IVolume newPlan, IVolume abovePlan = null)
        {
            VolumeRuntime newVolume = newPlan as VolumeRuntime;

            if (newVolume == null)
            {
                throw new NullReferenceException("Runtime Building Not Using Right Volume Type");
            }
            _volumes.Add(newVolume);
            if (abovePlan != null)
            {
                abovePlan.AddAbovePlan(newPlan);
                abovePlan.HeightModified(abovePlan);
            }
            return(newPlan);
        }
Ejemplo n.º 2
0
        public IVolume AddPlan(IVolume newPlan, IVolume abovePlan = null)
        {
            Volume newVolume = newPlan as Volume;

            if (newVolume == null)
            {
                throw new NullReferenceException("Runtime Building Not Using Right Volume Type");
            }

            Debug.Log("Building.cs AddPlan(IVolume newPlan, IVolume abovePlan = null) newPlan=(" + newVolume.transform.position.x + "," + newVolume.transform.position.y + ")");

            _volumes.Add(newVolume);
            if (abovePlan != null)
            {
                abovePlan.AddAbovePlan(newPlan);
                abovePlan.HeightModified(abovePlan);
            }
            MarkModified();
            return(newPlan);
        }