コード例 #1
0
ファイル: Ship.cs プロジェクト: veyvin/SystemWars
        public Ship(string name)
            : base(name)
        {
            Enabled          = true;
            shipCameraObject = new GameObject("shipCam");
            shipCameraObject.AddComponent(new ComponentCamera(MathHelper.PiOver4, SystemCore.GraphicsDevice.Viewport.AspectRatio, 0.1f, ScaleHelper.Billions(3), true));
            AddComponent(new HighPrecisionPosition());
            AddComponent(new ShipController());


            AddComponent(new MouseKeyboardShipController());

            AddComponent(new PhysicsComponent(true, false, PhysicsMeshType.sphere));
            SystemCore.GameObjectManager.AddAndInitialiseGameObject(shipCameraObject);
            HighPrecisionPositionComponent = GetComponent <HighPrecisionPosition>();
        }