コード例 #1
0
        public CharactorPreview(Rectangle drawRect, Texture2D background, Texture2D ngTexture, PlayerIndex playerID)
            : base(drawRect)
        {
            this.drawRect = drawRect;
            this.playerID = playerID;
            this.camera = new Camera();

            camera.FieldOfViewRadian = MathHelper.PiOver4;
            camera.Target = new Vector3(0, 0, -10);
            camera.Position = new Vector3(0.0f, 3, 6);
            this.background = background;
            this.ngTexture = ngTexture;
            info = new ModelInfo();
            isConflict = false;
        }
コード例 #2
0
ファイル: Attack.cs プロジェクト: hirama-akihiro/DropFight
        /// <param name="owner">生成したプレイヤー</param>
        public Attack(Player owner)
        {
            this.owner = owner;

            model = owner.AttackModel;
            Speed = owner.AttackSpeed;

            ModelInfo = new ModelInfo();
            ModelInfo.Position = owner.AttackPosition;

            Vector3 direction = owner.Direction;
            ModelInfo.Radian.Y = owner.RadianY;

            Vector3 blockPosition = ModelInfo.Position;
            blockPosition.Y--;
            this.BlockPosition = blockPosition;
        }
コード例 #3
0
        /// <summary>
        /// 描画
        /// </summary>
        public void Draw(Camera camera, ModelInfo modelInfo)
        {
            // ボーンの取得
            Matrix[] bones = animationPlayer.GetSkinTransforms();
            // ワールド座標
            Matrix world = modelInfo.World;

            foreach (ModelMesh mesh in currentModel.Meshes)
            {
                foreach (SkinnedEffect effect in mesh.Effects)
                {
                    effect.EnableDefaultLighting();
                    effect.SetBoneTransforms(bones);
                    effect.World = world;
                    effect.View = camera.View;
                    effect.Projection = camera.Projection;
                }
                mesh.Draw();
            }
        }
コード例 #4
0
ファイル: Fallable.cs プロジェクト: hirama-akihiro/DropFight
        public Fallable()
        {
            ModelInfo = new ModelInfo();

            ResetStatusOfFalling();
        }