|
Revision 5515, 0.8 kB
(checked in by mokehehe, 5 years ago)
|
|
描画を共通化
画面の左右をループさせてみる
|
| Line | |
|---|
| 1 | package {
|
|---|
| 2 | //=============================================================================
|
|---|
| 3 | import The;
|
|---|
| 4 |
|
|---|
| 5 | public class Actor {
|
|---|
| 6 | public var x: int;
|
|---|
| 7 | public var y: int;
|
|---|
| 8 | public var vx: int;
|
|---|
| 9 | public var vy: int;
|
|---|
| 10 |
|
|---|
| 11 | public var chr: int; ///< キャラ
|
|---|
| 12 |
|
|---|
| 13 | public var hitofsx: int; ///< 当たり判定開始左上座標
|
|---|
| 14 | public var hitofsy: int;
|
|---|
| 15 | public var hitw: int; ///< 当たり判定の大きさ
|
|---|
| 16 | public var hith: int;
|
|---|
| 17 |
|
|---|
| 18 | public var b_delete: Boolean;
|
|---|
| 19 |
|
|---|
| 20 | public function Actor() {
|
|---|
| 21 | x = y = vx = vy = 0;
|
|---|
| 22 | hitofsx = hitofsy = hitw = hith = 0;
|
|---|
| 23 | }
|
|---|
| 24 |
|
|---|
| 25 | // 更新処理
|
|---|
| 26 | public function update(): Boolean { return false; }
|
|---|
| 27 |
|
|---|
| 28 | // 描画
|
|---|
| 29 | public function render(g: JGraphics): void {
|
|---|
| 30 | g.drawImage(The.resmgr.img[chr], x/The.ONE, y/The.ONE);
|
|---|
| 31 | }
|
|---|
| 32 | }
|
|---|
| 33 | //=============================================================================
|
|---|
| 34 | }
|
|---|