ユーザ用ツール

サイト用ツール

サイドバー

About

Contents

Materials Link

その他

PR


wiki:enchant.js:tips:003

003 スプライトの表示

概要

スプライトを表示します。

ソースコード

// main.js
function preloadAssets()
{
	game = new Game(320,480);
	game.onload = init;
 
	game.start();
}
 
function init()
{
	game.scale = 1;
	game.fps = 30;
	scene = new Scene();
	scene.backgroundColor = "#000";
	game.pushScene(scene);
 
	sprite = new Sprite(64, 64);
	sprite.backgroundColor = "#66F";
	sprite.x = 32;
	sprite.y = 32;
 
	scene.addChild(sprite);
 
	main();
}

ダウンロード

Permalink wiki/enchant.js/tips/003.txt · 最終更新: 2014/11/07 09:10 (外部編集)

oeffentlich