这个例子是在之前的例子基础上 ,把之前d3dx10math数学库换成了最新的d3dxmath。优点就不说了。先上效果图
全部代码。以及效果文件
文件结构
全部代码:
按照上图的文件顺序
#pragma once
#include
#include
class XCamera
{
public:
XCamera()
{
m_positionX =...
分类:
其他好文 时间:
2014-10-07 19:50:34
阅读次数:
378
大型游戏中的音效相对比较复杂,如声音的淡入淡出,爆炸音效,声音的播放进度等。下面就看看一个音效管理系统都有些什么吧~~
1. 音效的基本操作:
#pragma once
//========================================================================
// Audio.cpp : Defines a simple sound...
分类:
其他好文 时间:
2014-10-06 18:55:10
阅读次数:
255
Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, return 1->2->3.
很简单,先判断第一个位置否为空,不为空的话再判断下 个位置是否为空,如果都为空那么就不用操作了。
如果两...
分类:
其他好文 时间:
2014-10-05 20:16:08
阅读次数:
202
解释下次补上
先上代码
XGraphics.h
#pragma once
#include
#include "XD3Device.h"
/////////////
// GLOBALS //
/////////////
const bool FULL_SCREEN = false; //是否全屏
const bool VSYNC_ENABLED = true; //是否垂直...
分类:
其他好文 时间:
2014-10-05 01:28:37
阅读次数:
308
Creating a Simple JSON ObjectThe following code segment demonstrates the creation of a simple JSON object containing one JSON pair. Once this object i...
分类:
Web程序 时间:
2014-10-04 21:00:07
阅读次数:
731
Treasure Map
Time Limit: 2 Seconds Memory Limit: 32768 KB
Your boss once had got many copies of a treasure map. Unfortunately, all the copies are now broken to many rectangular pieces, an...
分类:
其他好文 时间:
2014-10-04 13:42:37
阅读次数:
173
var once = (function(){ var res = {}, i = 0 ; return function(func){ if(typeof(func) != 'function'){ alert('参数类型不正确'); ...
分类:
其他好文 时间:
2014-10-03 03:02:33
阅读次数:
147
1、代码文件类型: (1)、[.h]头文件 (2)、[.m]c代码 (3)、[.mm]c++代码 2、调用头文件的方法#import,且只在没有调用过的时候调用一次,类似于PHP的require_once。 3、字符串NSString 通过@标志符,可由字符串常量...
分类:
其他好文 时间:
2014-10-02 03:29:12
阅读次数:
224
Frog
Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)
Total Submission(s): 1596 Accepted Submission(s): 442
Problem Description
Once upon a time, there ...
分类:
其他好文 时间:
2014-10-01 17:57:31
阅读次数:
197
In classical object-oriented programming languages, a constructor is a special method used to initialize a newly created object once memory has been a...
分类:
编程语言 时间:
2014-09-28 22:56:05
阅读次数:
213