Skip to content

Instantly share code, notes, and snippets.

View Aaeeschylus's full-sized avatar

Aaeeschylus

  • Australia
View GitHub Profile
//In the enemy class:
var totalTime = 0;
NormEnemy.prototype.update = function(deltaTime)
{
totalTime = totalTime + deltaTime;
var mathsSin = (100*(Math.sin(totalTime*3)));
if (this.ZigZagMovement == true)
{
this.position.x = this.zigZagMean + mathsSin;
@Aaeeschylus
Aaeeschylus / gist:818efc6b09de9cfa9283
Created November 8, 2015 11:50
what i am planning to use for spawning
var level1Time = 0;
function level1TotalTimeUpdate(){
level1Time = level1Time + deltaTime;
}
function level1Spawning() {
}