「PlayStation Suite SDK/プログラムの基本構造」を編集中
ナビゲーションに移動
検索に移動
この編集を取り消せます。 下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
3行目: | 3行目: | ||
namespace PssApp01 | namespace PssApp01 | ||
{ | { | ||
− | + | using System; | |
− | + | using System.Collections.Generic; | |
− | + | ||
− | + | using Sce.Pss.Core; | |
− | + | using Sce.Pss.Core.Environment; | |
− | + | using Sce.Pss.Core.Graphics; | |
− | + | using Sce.Pss.Core.Input; | |
− | + | ||
− | + | public class AppMain | |
− | + | { | |
− | + | private static GraphicsContext graphics; | |
− | + | ||
− | + | public static void Main (string[] args) | |
− | + | { | |
− | + | Initialize (); | |
− | + | ||
− | + | // ゲームループ | |
− | + | while (true) { | |
− | + | SystemEvents.CheckEvents (); | |
− | + | Update (); | |
− | + | Render (); | |
− | + | } | |
− | + | } | |
− | + | public static void Initialize () | |
− | + | { | |
− | + | graphics = new GraphicsContext (); | |
− | + | } | |
− | + | public static void Update () | |
− | + | { | |
− | + | // ここにキー入力やキャラの移動、当たり判定などの | |
− | + | // ゲーム内容を書く | |
− | + | } | |
− | + | public static void Render () | |
− | + | { | |
− | + | graphics.SetClearColor (0.0f, 0.0f, 0.0f, 0.0f); | |
− | + | graphics.Clear (); | |
− | + | ||
− | + | // ここに描画処理を書く | |
− | + | graphics.SwapBuffers (); | |
− | + | } | |
− | + | } | |
} | } | ||
</source> | </source> |