Example #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();
        }
Example #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);
        }
Example #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();
        }