By continuing to use the site, you agree to the use of cookies. You can find out more by following this link. I Accept
navi icon
...but can you see it? No, sorry ,it is in the code. I'm proud to introduce to you : 'types'.
2013-01-29 17:59:15 Types make inner structure much
better. A normal memo can have the type 'text', 'audio' or 'image'.
A memo of the type 'plugin' is interpreted as a javascript. So now you can
program, write, compose and use your drawings.

Here is a the source for a simple plugin:


/*
plugin that shows all memos */
console.log('this plugin -> '+uid);
//the width of the memos retangles is also their height
var w = screenwidth / 10;
//now we gather all memos of the game
var memos = game.getAllMemos();
console.log('memos
length = '+memos.length);
//set the context's color styles
context.fillStyle = '#ff6';
context.strokeStyle = '#ff6';
for (var
i = 0; i < memos.length; i++) {
//now we draw all memos
context.strokeRect(10 + (i%5)*(w+10),10 + (i%4)*(w+10),w, w);
context.fillText(memos.uid, 10 + (i%5)*(w+10),30 + (i%4)*(w+10));
}
context.stroke();
context.fill();
update = true;



By the way the board has a new background image.




Share the article: 




comments powered by Disqus
Preparing for GDC 2015

Preparing for GDC 2015

GDC 2015 will start soon. For the first time I will be an IGDA volunteering minion.

cookies

cookies

Yes, I use cookies on this webpage. The cookie-policy.