示例#1
0
        private void btnDuplicateTrait_Click(object sender, EventArgs e)
        {
            WeatherEffect newCopy = prntForm.weatherEffectsList[selectedLbxIndex].DeepCopy();

            newCopy.tag = "newWeatherEffectTag_" + prntForm.mod.nextIdNumber.ToString();
            prntForm.weatherEffectsList.Add(newCopy);
            refreshListBox();
        }
示例#2
0
        public WeatherEffect DeepCopy()
        {
            //WeatherEffect other = (WeatherEffect)this.MemberwiseClone();
            WeatherEffect other = new WeatherEffect();

            other.name  = this.name;
            other._name = this._name;
            other.tag   = this.tag;
            other._tag  = this._tag;
            foreach (FullScreenEffectLayer fsel in this.WeatherLayers)
            {
                FullScreenEffectLayer fsel2 = fsel.DeepCopy();
                other.WeatherLayers.Add(fsel2);
            }
            return(other);
        }
示例#3
0
        private void btnAddTrait_Click(object sender, EventArgs e)
        {
            WeatherEffect newTS = new WeatherEffect();

            newTS.name = "newWeatherEffect";
            newTS.tag  = "newWeatherEffectTag_" + prntForm.mod.nextIdNumber.ToString();

            for (int i = 4; i < 10; i++)
            {
                FullScreenEffectLayer newLayer = new FullScreenEffectLayer();
                newLayer.fullScreenEffectOrderNumber = i + 1;
                newTS.WeatherLayers.Add(newLayer);
            }

            prntForm.weatherEffectsList.Add(newTS);
            refreshListBox();
        }