4.2.4.2 クラス配分 †
In this tutorial we will divide the logic into several classes:
このチュートリアルでは、いくつかのクラスに論理を分配します。
- AppMazing?: this is the main application class. It handles the Crystal Space event stuff and basic Crystal Space setup.
- Game: this is the main class controlling the game logic. It ties everything together.
- RoomCoordinate?: this is a small class that is used to represent a coordinate in our maze. A coordinate is a three dimensional integer coordinate that represents a node in our three dimensional maze.
- Maze: this class is the representation of the maze. i.e. the world where the game happens. In this game we will make a three dimensional maze where every node of the maze is a sector. This class keeps track of those sectors.
- Player: the player with the collider (collision detection) is managed by this class. This class also takes care of player movement.
- Adversary: this is the enemy! Every enemy in the game will have an instance of this class. This class also manages the very primitive artificial intelligence.
- Explosion: whenever an adversary explodes there will be an explosion. For every explosion we have an instance of this class.
- Laser: the player can fire with a laserbeam. There is one instance of this class which manages visibility and collision detection of the beam.
- AppMazing?: これはメインアプリケーションクラスです。これは、Crystal Spaceイベントと基本的なCrystal Spaceの初期化を処理します。
- Game: これは、ゲーム論理を制御するメインクラスです。すべてを結び付けます。
- RoomCoordinate?: これは、迷路内の座標を表すために使用される小さなクラスです。座標は、3次元のinteger座標です。それは、3次元迷路の節を表します。
- Maze: このクラスは、迷路の代表のクラスです。例えば、ゲームが開始する世界です。このゲームでは、すべての節がセクタである3次元迷路を作成します。このクラスでは、それらのセクタを保持します。
- Player: コリジョン衝突に使用するプレイヤは、このクラスで管理されます。このクラスはプレイヤの移動も扱います。
- Adversary: これは敵です! ゲーム内のすべての敵は、このクラスのインスタンスを持っています。このクラスは、とても原始的な人工知能も管理します。
- Explosion: 敵が爆発するときに使用されます。すべての爆発は、このクラスのインスタンスを持っています。
- Laser: プレイヤはレーザービームを打つことができます。それは、このクラスのインスタンスです。このクラスでは、ビームの視覚とコリジョン衝突を管理します。
最新の20件
2007-02-18
2007-02-12
2007-01-31
2007-02-12
2007-01-14
2007-01-21
2007-02-12
2007-02-11
2007-01-15
2007-01-14
2007-02-12
2007-02-11
2007-02-01
2007-01-21
2007-01-19
2007-02-12
2007-01-19
2009-08-27
2007-01-10
今日の5件
- counter: 114
- today: 1
- yesterday: 0
- online: 1