Ejemplo n.º 1
0
        // Factory function
        public static SoundEffectsItem CreateEmpty(GameObjectItem go)
        {
            var sound = new SoundEffectsItem();

            sound.SoundData  = new ListItem <SoundDataItem>();
            sound.gameObject = go;
            sound.layer      = go.layer;
            sound.Position   = go.Position;

            return(sound);
        }
Ejemplo n.º 2
0
        public override Item clone()
        {
            SoundEffectsItem result = (SoundEffectsItem)this.MemberwiseClone();

            result.SoundData = new ListItem <SoundDataItem>();
            foreach (SoundDataItem data in SoundData)
            {
                result.SoundData.Add(data);
            }

            result.polygon  = (Vector2[])polygon.Clone();
            result.hovering = false;
            return(result);
        }