public Room(Room r) { center = r.center; size = r.size; hasWarp = r.hasWarp; color = r.color; id = r.id; currentOrbs = r.currentOrbs; maxOrbs = r.maxOrbs; currentBlueOrbs = r.currentBlueOrbs; currentRedOrbs = r.currentRedOrbs; maxRedOrbs = r.maxRedOrbs; maxBlueOrbs = r.maxBlueOrbs; sectorID = r.sectorID; explored = r.explored; bossCleared = r.bossCleared; stationDecal = r.stationDecal; friendlyName = r.friendlyName; warpCost = r.warpCost; blocks = new List<Block>(); foreach (Block b in r.blocks) { blocks.Add(new Block(b)); } doodads = new List<Doodad>(); foreach (Doodad d in r.doodads) { doodads.Add(new Doodad(d)); } jumpRings = new List<JumpRing>(); tunnels = new List<Tunnel>(); monsters = new List<Monster>(); foreach (Monster m in r.monsters) { monsters.Add(new Monster(m)); } projectiles = new List<Projectile>(); foreach (Projectile p in r.projectiles) { projectiles.Add(new Projectile(p)); } decorations = new List<Decoration>(); foreach (Decoration d in r.decorations) { decorations.Add(new Decoration(d)); } }
public Doodad(Doodad d) { srcDoodad = this; style = d.style; //unfoldedPosition = new Vertex(d.unfoldedPosition); position = new Vertex(d.position); spawnPosition = new Vertex(d.spawnPosition); active = d.active; available = d.available; id = d.id; idle = d.idle; targetBehavior = d.targetBehavior; targetObject = d.targetObject; expectedBehavior = d.expectedBehavior; alreadyUsed = d.alreadyUsed; type = d.type; behaviors = d.behaviors; currentBehaviorId = d.currentBehaviorId; if(d.currentBehavior != null) currentBehaviorId = d.currentBehavior.id; orbsRemaining = d.orbsRemaining; doorDecal = d.doorDecal; currentTime = d.currentTime; nextBehavior = d.nextBehavior; breakTime = d.breakTime; behaviorStarted = d.behaviorStarted; toggleOn = d.toggleOn; abilityType = d.abilityType; originalAbilityType = d.originalAbilityType; cooldown = d.cooldown; activationCost = d.activationCost; speaker = d.speaker; targetDoodadId = d.targetDoodadId; if(d.targetDoodad != null) targetDoodadId = d.targetDoodad.id; targetBlockId = d.targetBlockId; if (d.targetBlock != null) targetBlockId = d.targetBlock.id; targetEdgeId = d.targetEdgeId; if (d.targetEdge != null) targetEdgeId = d.targetEdge.id; targetRoomId = d.targetRoomId; if(d.targetRoom != null) targetRoomId = d.targetRoom.id; stateTransition = d.stateTransition; stateTransitionDir = d.stateTransitionDir; stateTransitionVelocity = d.stateTransitionVelocity; _powered = d._powered; behaviors = new List<Behavior>(); foreach (Behavior b in d.behaviors) { behaviors.Add(new Behavior(b)); } }