view webGL/dandy/resources/charaTable.js @ 21:6dd37a368a1f

create charaTable
author NOBUYASU Oshiro
date Wed, 06 Oct 2010 23:47:02 +0900
parents
children
line wrap: on
line source

enemystate = [];

function initEnemyTable(gl) {
    createEnemyTable();
    regiEnemyTable(gl);
}

function pushEnemyTable(charano, score, hardness) {

    var enemy = new Object();
    enemy.charano = charano;
    enemy.sc = score;
    enemy.p = hardness;
    enemy.image = new Object();
    enemystate.push(enemy);
}

function createEnemyTable(){
    pushEnemyTable(0,0,0);
    pushEnemyTable(ENEMY_GREENCRAB,330,98);
    pushEnemyTable(ENEMY_PLANE,470,37);
    pushEnemyTable(ENEMY_REDBULLET,30,16);
    pushEnemyTable(BOSS1_ORGAN,25000,10000);
    pushEnemyTable(BOSS1_ORGAN,10000,10000);
    pushEnemyTable(ENEMY_BLUEBULLET,40,39);
    pushEnemyTable(ENEMY_LASER,100,100000);
    pushEnemyTable(ENEMY_LIGHTNING,100,100000);
    pushEnemyTable(ASTEROID,170,500);
    pushEnemyTable(BOSS2_BODY,100,500);
    pushEnemyTable(BOSS2_LEFTSHOULDER,10000,12000);
    pushEnemyTable(BOSS2_RIGHTSHOULDER,10000,12000);
    pushEnemyTable(BOSS2_RIGHTARM,5000,15000);
    pushEnemyTable(BOSS2_LEFTARM,5000,15000);
    pushEnemyTable(BOSS2_BATTERY,10000,5000);
    pushEnemyTable(BOSS2_OPENBATTERY,10000,5000);
    pushEnemyTable(BOSS2_BROKENHATCH,100,500);
    pushEnemyTable(BOSS2_DUMMY,50000,15000);
    pushEnemyTable(BOSS2_RIGHTSHOULDERUP,10000,20000);
    pushEnemyTable(BOSS2_LEFTSHOULDERUP,10000,15000);
    pushEnemyTable(BOSS2_LEFTSHOULDERGIRD,100,20000);
    pushEnemyTable(BOSS2_RIGHTARMBATTERY,100,500);
    pushEnemyTable(BOSS2_LEFTARMBATTERY,100,500);
    pushEnemyTable(ORBITMACHINE,20,1000000);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(BLACKHOLE,200000,30000);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(GUNBATTERY,540,137);
    pushEnemyTable(PURPLECORE,840,287);
    pushEnemyTable(SPACEFISH,370,137);
    pushEnemyTable(MISSILE,210,24);
    pushEnemyTable(BOSS3_BODY,100000,9600);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(0,0,0);
    pushEnemyTable(BODD4_BODY,300000,20400);
}

function regiEnemyImage(gl, num, name) {
    enemystate[num].image = gl.obj[name];
}

function regiEnemyTable(gl) {
    regiEnemyImage(gl, 1, "enemy_greencrab");
    regiEnemyImage(gl, 2, "enemy_plane");
    regiEnemyImage(gl, 3, "redbullet");
    regiEnemyImage(gl, 4, "boss_orgun");
    regiEnemyImage(gl, 5, "boss_orgun");
    regiEnemyImage(gl, 6, "enemy_bluebullet");
    regiEnemyImage(gl, 7, "enemy_lasersplosh.001");
    regiEnemyImage(gl, 8, "enemy_lightning");
    regiEnemyImage(gl, 9, "enemy_greencrab");//本当はASTEROID
    regiEnemyImage(gl, 10, "boss2_body");
    regiEnemyImage(gl, 11, "boss2_leftshoulder");
    regiEnemyImage(gl, 12, "boss2_rightshoulder");
    regiEnemyImage(gl, 13, "boss2_rightarm");
    regiEnemyImage(gl, 14, "boss2_leftarm");
    regiEnemyImage(gl, 15, "boss2_battery");
    regiEnemyImage(gl, 16, "boss2_openbattery");
}