Tweak physics, cannons, nsbtp support, prepare to add items.

This commit is contained in:
riperiperi committed 2019-05-29 01:08:48 +01:00
1 parent e1dc8603d1
commit e010627b5d
19 files changed
+982 -353

No files matched your search

+54
View File
@@ -0,0 +1,54 @@
window.BananaC = function(item, scene, type) {
this.canBeHeld = true;
this.canBeDropped = true;
this.isDestructive = false;
item.minBounceVel = 0;
this.collideKart = collideKart;
function collideKart(kart) {
item.deadTimerLength = 20;
kart.damage(MKDSCONST.DAMAGE_SPIN);
}
}
window.BananaGroupC = function(item, scene, type) {
this.canBeHeld = false;
this.canBeDropped = 'func';
this.rotationPeriod = 45;
item.colRadius = -Infinity;
item.enablePhysics = false;
this.draw = draw;
function draw(mvMatrix, pMatrix) {
//the group itself is invisible - the bananas draw individually
}
}
window.FakeBoxC = function(item, scene, type) {
this.canBeHeld = true;
this.canBeDropped = true;
this.isDestructive = false;
this.isSolid = true;
var model = scene.gameRes.fakeBox;
this.draw = draw;
function draw(view, pMatrix) {
mat4.translate(mat, view, t.pos);
mat4.translate(mat, view, [0, 16, 0]);
/* adjust to make it rest on a corner
if (t.angle[2] != 0) mat4.rotateZ(mat, mat, t.angle[2]*(Math.PI/180));
if (t.angle[1] != 0) mat4.rotateY(mat, mat, t.angle[1]*(Math.PI/180));
if (t.angle[0] != 0) mat4.rotateX(mat, mat, t.angle[0]*(Math.PI/180));
*/
mat4.scale(mat, mat, vec3.scale([], t.scale, 16));
model.draw(mat, pMatrix, animMat);
}
}
window.BombC = null;
+10
View File
@@ -0,0 +1,10 @@
//boost, 3x boost, queen boost, star, ghost
window.MushroomC = null;
window.MushroomGroupC = null;
window.QueenMushroomC = null;
window.StarC = null;
window.ThunderC = null;
window.BlooperC = null;
window.BooC = null;
window.KillerC = null;
+25
View File
@@ -0,0 +1,25 @@
window.GreenShellC = function(item, scene) {
this.canBeHeld = true;
this.canBeDropped = true;
this.isDestructive = true;
}
window.RedShellC = function(item, scene) {
this.canBeHeld = true;
this.canBeDropped = true;
this.isDestructive = true;
}
window.ShellGroupC = function(item, scene, type) {
this.canBeHeld = false;
this.canBeDropped = 'func';
this.rotationPeriod = 45;
this.draw = draw;
function draw(mvMatrix, pMatrix) {
//the group itself is invisible - the shells draw individually
}
}
window.BlueShellC = null;