예제 #1
0
        protected override void Load()
        {
            RemoveMe = false;

            gameEntity = mSceneMgr.CreateEntity("Sphere.mesh");
            GameNode   = mSceneMgr.CreateSceneNode();
            GameNode.Scale(2, 2, 2);
            GameNode.AttachObject(gameEntity);
            mSceneMgr.RootSceneNode.AddChild(GameNode);

            physObj           = new PhysObj(10, "CannonBall", 0.1f, 0.5f);
            physObj.SceneNode = GameNode;
            physObj.AddForceToList(new WeightForce(physObj.InvMass));

            Physics.AddPhysObj(physObj);
        }
예제 #2
0
 /// <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));
 }