//SceneNode controlNode; /// <summary> /// This applies the physic engine to the player model. /// It calls a new model, controller, stats and armoury in its constructor taken from the player classes. /// </summary> /// <param CharacterModel="model"></param> /// <param CharacterController="controller"></param> /// <param CharacterStats="stats"></param> public Player(/*CharacterModel model, */ /*CharacterController controller,*/ /*CharacterStats stats,*/ SceneManager mSceneMgr) { model = new PlayerModel(mSceneMgr); controller = new PlayerController(this, mSceneMgr); stats = new PlayerStats(); armoury = new Armoury(); float radius = 15; model.GameNode.Position += radius * Vector3.UNIT_Y; model.GameNode.Position -= radius * Vector3.UNIT_Y; physObj = new PhysObj(radius, "Player", 0.1f, 0.02f, 0.3f); physObj.SceneNode = model.GameNode; physObj.Position = model.GameNode.Position; physObj.AddForceToList(new WeightForce(physObj.InvMass)); Physics.AddPhysObj(physObj); physObj.SceneNode = model.GameNode; }
/// <summary> /// sets the game node scale in the constructor /// </summary> /// <param name="mSceneMgr"></param> /// <param name="gun"></param> /// <param name="playerAmoury"></param> public CollectableGun(SceneManager mSceneMgr, Gun gun, Armoury playerAmoury) { this.mSceneMgr = mSceneMgr; GameNode.Scale(new Vector3(1.5f)); }