using System; using System.Collections.Generic; using Microsoft.Xna.Framework; namespace KinPortal { public class PortalManager { public enum PortalType {RED, BLUE}; public Scene Scene {get; private set;} public Portal BluePortal {get; private set;} public Portal RedPortal {get; private set;} public PortalManager(Scene scene) { BluePortal = null; RedPortal = null; Scene = scene; } public void CreatePortal(Vector3 pos, Quaternion rot, PortalType type) { if(type == PortalType.RED) { if(RedPortal == null) { RedPortal = new Portal("models\\portal_red", Vector3.Zero, Quaternion.Identity, Scene); Scene.AddComponent(RedPortal); } RedPortal.Pos = pos; RedPortal.Rot = rot; } if(type == PortalType.BLUE) { if(BluePortal == null) { BluePortal = new Portal("models\\portal_blue", Vector3.Zero, Quaternion.Identity, Scene); Scene.AddComponent(BluePortal); } BluePortal.Pos = pos; BluePortal.Rot = rot; } } } }