<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
var x=new Array();
var y=new Array();
var life=new Array();
var dx=new Array();
function sample(){
var sub=new f();
sub.x=x;
sub.y=y;
sub.life=life;
sub.pon();
x=sub.x;
y=sub.y;
life=sub.life;
$("#memo").html(life[7]);
}
function paint(){
var canv = document.getElementById('memo');
var ctx = canv.getContext('2d');
ctx.fillStyle = "white";
ctx.fillRect(0, 0, 500, 500);
for(s=1;s<101;s++){
ctx.fillStyle = "red";
if(life[s]>50)ctx.fillRect(x[s], y[s], 10, 10);
}
}
class f{
pon(){
for(this.s=1;this.s<11;this.s++){
this.x[this.s]=250;
this.y[this.s]=0;
this.life[this.s]=0;
}
}
}
</script>
最終更新:2017年09月15日 11:02