è‹«°ç‰§é«°‚...

Download è‹«°ç‰§é«°‚ ‚½ƒ•ƒˆ‚¦‚§‚¢ƒ†‚¯ƒƒ­‚¸ƒ¼éƒ¨  §‚²ƒ¼ƒ ½œ‚ 1

If you can't read please download the document

Post on 19-Jul-2015

469 views

Category:

Technology

6 download

Embed Size (px)

TRANSCRIPT

  • 1 enchant.js

    (1)2015/04/13

  • ET

    1ET

    12

    15403

  • enchant.js

    2D

    Javascript

    9leap

  • enchant.js

    TeraPadOK

    Internet Exproler 11PC

  • USB softech_01

  • softech_01/ - chara1.png - enchan.js - index.html - main.js

  • softech_01/ - chara1.png - enchan.js - index.html - main.js

    enchant.js

  • index.html

  • index.html

  • main.js

    enchant();

    window.onload = function() { var core = new Core(320, 320);

    core.onload = function() {

    } core.start(); }

  • main.js

    enchant();

    window.onload = function() { var core = new Core(320, 320);

    core.onload = function() {

    } core.start(); }

    Core

    enchant.js

  • main.jsenchant();

    window.onload = function() { var core = new Core(320, 320); core.preload('chara1.png');

    core.onload = function() { var bear = new Sprite(32, 32); bear.image = core.assets['chara1.png']; bear.x = 0; bear.y = 0;

    core.rootScene.addChild(bear); } core.start(); }

  • main.jsenchant();

    window.onload = function() { var core = new Core(320, 320); core.preload('chara1.png');

    core.onload = function() { var bear = new Sprite(32, 32); bear.image = core.assets['chara1.png']; bear.x = 0; bear.y = 0;

    core.rootScene.addChild(bear); } core.start(); }

  • 1 core.preload(chara1.png);

    2 var bear = Sprite();

    3 bear.image = core.assets[chara1.png];

    4bear.x = 0;bear.y = 0;

    5bear core.rootScene.addChild(bear);

  • 1 enchant.js preloadcore.preload(le_name.png);

    core.assets[le_name.png];

  • 2

    Javascriptvar var name = Mukohira Takuya;var age = 19;

    19 int Takuya Mukohira

  • 2 enchant.jsvar bear = Sprite();

    Spritebear

  • 2 Sprite

    bear.image, bear.x

  • 3 Spritebearbear.image = core.assets[chara1.png];

    preload

  • 4 SpritebearXYbear.x, bear.y

    bear.x = 0; bear.y = 0; bear(0, 0)

  • 5bear enchant.js

    core.rootScene.addChild(bear);

  • main.jsenchant();

    window.onload = function() { var core = new Core(320, 320); core.preload('chara1.png');

    core.onload = function() { var bear = new Sprite(32, 32); bear.image = core.assets['chara1.png']; bear.x = 0; bear.y = 0;

    core.rootScene.addChild(bear); } core.start(); }

    bear

  • 1

  • 11.

    2.

  • Sprite()

    Sprite()

  • / / / / 15

  • main.jsenchant();

    window.onload = function() { var core = new Core(320, 320); core.preload('chara1.png');

    core.onload = function() { var bear = new Sprite(32, 32); bear.image = core.assets['chara1.png']; bear.x = 0; bear.y = 0;

    core.rootScene.addChild(bear);

    bear.addEventListener('enterframe', function() { this.x += 3; }); } core.start(); }

  • main.jsenchant();

    window.onload = function() { var core = new Core(320, 320); core.preload('chara1.png');

    core.onload = function() { var bear = new Sprite(32, 32); bear.image = core.assets['chara1.png']; bear.x = 0; bear.y = 0;

    core.rootScene.addChild(bear);

    bear.addEventListener('enterframe', function() { this.x += 3; }); } core.start(); }

  • 16060fps

    bear.addEventListener(enterframe, function(){ bear.x += 3;});enterframefunction(){}

    function(){}bear.x += 3;bear.x += 3;bear.xbearX3

    bear.x += 3;

  • main.jsenchant();

    window.onload = function() { var core = new Core(320, 320); core.preload('chara1.png');

    core.onload = function() { var bear = new Sprite(32, 32); bear.image = core.assets['chara1.png']; bear.x = 0; bear.y = 0;

    core.rootScene.addChild(bear);

    bear.addEventListener('enterframe', function() { this.x += 3; }); } core.start(); }

    bearX3

  • bear

    bear.scalebear.rotatebear.

  • main.jsenchant();

    window.onload = function() { var core = new Core(320, 320); core.preload('chara1.png');

    core.onload = function() { var bear = new Sprite(32, 32); bear.image = core.assets['chara1.png']; bear.x = 0; bear.y = 0;

    core.rootScene.addChild(bear);

    bear.addEventListener('enterframe', function() { this.x += 3; }); } core.start(); }

  • bear.rotate(2);

  • main.jsenchant();

    window.onload = function() { var core = new Core(320, 320); core.preload('chara1.png');

    core.onload = function() { var bear = new Sprite(32, 32); bear.image = core.assets['chara1.png']; bear.x = 0; bear.y = 0;

    core.rootScene.addChild(bear);

    bear.addEventListener('enterframe', function() { this.x += 3;

    this.rotate(2); }); } core.start(); }

  • bear.scale(1.01, 1.01);

  • main.jsenchant();

    window.onload = function() { var core = new Core(320, 320); core.preload('chara1.png');

    core.onload = function() { var bear = new Sprite(32, 32); bear.image = core.assets['chara1.png']; bear.x = 0; bear.y = 0;

    core.rootScene.addChild(bear);

    bear.addEventListener('enterframe', function() { this.x += 3;

    this.scale(1.01, 1.02); }); } core.start(); }

  • 1

  • core 320 x 320

    bear.x 320

  • bear.x 320bear.x0

View more