Example #1
0
        VertexBuffer vertexBuffer; //頂点バッファ

        #endregion Fields

        #region Constructors

        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="mainGame"></param>
        /// <param name="camera"></param>
        /// <param name="texture"></param>
        /// <param name="vectors">ここでは各頂点の座標を指定する(ただし、順番はZ字に)</param>
        public TexturePolygon(MainGame mainGame, Camera camera, Texture2D texture, Vector3[] vectors)
            : base(mainGame)
        {
            this.camera = camera;
            this.texture = texture;
            this.vectors = vectors;
        }
Example #2
0
        public override void LoadContent()
        {
            base.LoadContent();

            //カメラを生成
            this.camera = new Camera(mainGame);
            this.camera.LoadContent();
            this.camera.Position = new Vector3(0, 0, 1500);

            //地図を描画するためのポリゴンを生成
            this.texturePolygon = new TexturePolygon(mainGame,
                camera,
                mainGame.Content.Load<Texture2D>("important/japanMap"),
                new Vector3[4]{
                    new Vector3(-1920/2f, 1080/2.0f, 0.0f),
                    new Vector3(1920/2.0f, 1080/2.0f, 0.0f),
                    new Vector3(-1920/2.0f, -1080/2.0f, 0.0f),
                    new Vector3(1920/2.0f, -1080/2.0f, 0.0f),
                });
            this.texturePolygon.LoadContent();

            //選択されている地域
            selectedArea = AreaGroup.北海道;

            //地域の座標を設定
            areaVectors = new Vector3[8];
            areaVectors[(int)AreaGroup.北海道] = new Vector3(830, 280, 630);
            areaVectors[(int)AreaGroup.東北] = new Vector3(670, 60, 630);
            areaVectors[(int)AreaGroup.関東] = new Vector3(360, -210, 320);
            areaVectors[(int)AreaGroup.中部] = new Vector3(140, -150, 400);
            areaVectors[(int)AreaGroup.近畿] = new Vector3(-110, -260, 280);
            areaVectors[(int)AreaGroup.中国] = new Vector3(-350, -230, 450);
            areaVectors[(int)AreaGroup.四国] = new Vector3(-250, -230, 450);
            areaVectors[(int)AreaGroup.九州] = new Vector3(-620, -440, 500);
        }
Example #3
0
 //コンストラクタ
 public Figure(MainGame mainGame, Model model, Camera camera)
     : base(mainGame)
 {
     this.camera = camera;
     this.model = model;
     position = new Vector3(0.0f, 0.0f, 0.0f);
     rotateX = 0.0f;
     rotateY = 0.0f;
     rotateZ = 0.0f;
     scale = new Vector3(1.0f, 1.0f, 1.0f);
 }