using System;
using System.Collections.Generic;
using Sce.PlayStation.Core;
using Sce.PlayStation.Core.Environment;
using Sce.PlayStation.Core.Graphics;
using Sce.PlayStation.Core.Input;
using Sce.PlayStation.Core.Imaging;
using Sce.PlayStation.HighLevel.UI;
namespace mojitest
{
public class AppMain
{
private static GraphicsContext graphics;
static Scene scene;
static Label label;
public static void Main (string[] args)
{
Initialize ();
while (true) {
SystemEvents.CheckEvents ();
Update ();
Render ();
}
}
public static void Initialize ()
{
// Set up the graphics system
graphics = new GraphicsContext ();
//UISystemを初期化します
UISystem.Initialize(graphics);
//シーンを作成します
scene = new Scene();
UISystem.SetScene(scene);
public static void Update ()
{
// Query gamepad for current state
var gamePadData = GamePad.GetData (0);
List touchData = Touch.GetData(0);
//UISystemの更新です
UISystem.Update(touchData);
}
public static void Render ()
{
// Clear the screen
graphics.SetClearColor (0.0f, 0.0f, 0.0f, 0.0f);
graphics.Clear ();
//UISystemを描画します
UISystem.Render();
// Present the screen
graphics.SwapBuffers ();
}
}
}
(1)一番簡単な方法
それは、HighLevel.UI の Labelを使うこと。
using System;
using System.Collections.Generic;
using Sce.PlayStation.Core;
using Sce.PlayStation.Core.Environment;
using Sce.PlayStation.Core.Graphics;
using Sce.PlayStation.Core.Input;
using Sce.PlayStation.Core.Imaging;
using Sce.PlayStation.HighLevel.UI;
namespace mojitest
{
public class AppMain
{
private static GraphicsContext graphics;
static Scene scene;
static Label label;
public static void Main (string[] args)
{
Initialize ();
while (true) {
SystemEvents.CheckEvents ();
Update ();
Render ();
}
}
public static void Initialize ()
{
// Set up the graphics system
graphics = new GraphicsContext ();
UISystem.Initialize(graphics);
scene = new Scene();
UISystem.SetScene(scene);
using Sce.PlayStation.Core;
using Sce.PlayStation.Core.Environment;
using Sce.PlayStation.Core.Graphics;
using Sce.PlayStation.Core.Input;
using Sce.PlayStation.Core.Imaging;
using Sce.PlayStation.HighLevel.UI;
namespace mojitest
{
public class AppMain
{
private static GraphicsContext graphics;
public static void Initialize ()
{
// Set up the graphics system
graphics = new GraphicsContext ();
UISystem.Initialize(graphics);
scene = new Scene();
UISystem.SetScene(scene);
image = new Image(ImageMode.Rgba,new ImageSize(960,60),
new ImageColor (255,0,0,0));
image.DrawText("テキスト文字列です",
new ImageColor(255,255,255,255),
new Font(FontAlias.System,60,FontStyle.Regular),
new ImagePosition(0,0));
texture2d = new Texture2D(960,60,false,PixelFormat.Rgba);
texture2d.SetPixels(0,image.ToBuffer());
image.Dispose();
「デッドエンドヴァレンタイン」はアメリカでも配信しています。日本版と内容は全て一緒です。翻訳とかしてません。メニューも全部日本語のままです。タイトルのみ英語で「Dead End Valentine」としています(そのままです)。説明文には、
It is an adventure type novel game which reads and advances a story, chooses action on a specific aspect of affairs, and advances the game. A game is performed by screen touch operation.
Sorry. Language is only Japanese.
グーグル先生と、エキサイト先生に翻訳してもらったので、合ってるのかわかりませんが、これを入力して販売しています。
日本と、アメリカの販売の比率は、だんだんとアメリカでの比率が上がってきて 日本69%、アメリカ31%となっています。
Visual Studioで開発したいという話をよく聞きますが、山田はPSM Studioをかなり気に入っています。
まず、中カッコが自動で改行されないところが良いです。
static bool Loop = true;
public static void Main (string[] args){
Initialize ();
while (Loop) {
SystemEvents.CheckEvents ();
Update ();
Render ();
}
}
Visual Studioで書くと
static bool Loop = true;
public static void Main (string[] args)
{
Initialize ();
while (Loop)
{
SystemEvents.CheckEvents ();
Update ();
Render ();
}
}
設定しないと改行されてしまう。
括弧の位置は会社の方針に合わせればいいので、下のように書くことが多いんだけど、個人的な趣味で書いてるときは、上のように書くと落ち着きます。PSM Studioだと自動で改行されないので、好きなように書くことができます。