public User(StateManager stateMgr, API.Geo.World world) { this.mStateMgr = stateMgr; this.mWorld = world; this.mTimeSinceGUIOpen = new Timer(); this.mCameraMan = null; this.IsAllowedToMoveCam = true; this.IsFreeCamMode = true; Camera cam = this.mStateMgr.Camera; cam.Position = new Vector3(-203, 633, -183); cam.Orientation = new Quaternion(0.3977548f, -0.1096644f, -0.8781486f, -0.2421133f); this.mCameraMan = new CameraMan(cam); this.mSelectedAllies = new HashSet <VanillaNonPlayer>(); this.mRandom = new Random(); this.mFigures = new MOIS.KeyCode[10]; for (int i = 0; i < 9; i++) { this.mFigures[i] = (MOIS.KeyCode)System.Enum.Parse(typeof(MOIS.KeyCode), "KC_" + (i + 1)); } this.mFigures[9] = MOIS.KeyCode.KC_0; this.mWireCube = this.mStateMgr.SceneMgr.RootSceneNode.CreateChildSceneNode(); this.mWireCube.AttachObject(StaticRectangle.CreateRectangle(this.mStateMgr.SceneMgr, Vector3.UNIT_SCALE * Cst.CUBE_SIDE)); this.mWireCube.SetVisible(false); this.Inventory = new Inventory(10, 4, new int[] { 3, 0, 1, 2 }, true); }
protected void FinishCreation() { this.FeetPosition = this.mCharInfo.SpawnPoint; this.mCollisionMgr = new CollisionMgr(this.mCharacMgr.World, this); this.mWireBoxes = new SceneNode[2]; for (int i = 0; i < 2; i++) { this.mWireBoxes[i] = this.mNode.CreateChildSceneNode(); this.mWireBoxes[i].InheritScale = false; this.mWireBoxes[i].InheritOrientation = true; this.mWireBoxes[i].AttachObject(StaticRectangle.CreateRectangle(this.mCharacMgr.SceneMgr, new Vector3(-Cst.CUBE_SIDE / 2, 0, -Cst.CUBE_SIDE / 2), new Vector3(1, 2, 1) * Cst.CUBE_SIDE, i == 0 ? ColoredMaterials.BLUE : ColoredMaterials.RED)); this.mWireBoxes[i].SetVisible(false); } }