How to use the o2.parent function in o2

To help you get started, we’ve selected a few o2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Laboralphy / h5-raycaster-lab / servers / mw / node_modules / mwgame / Effects / Luck.js View on Github external
__construct: function(nLevel) {
		O2.parent(this, 'Luck', nLevel > 0 ? 'bless' : 'curse');
		this.setLevel(nLevel);
	},
github Laboralphy / h5-raycaster-lab / servers / mw / node_modules / mwgame / Effects / Magnet.js View on Github external
__construct: function(nPower) {
		O2.parent(this, 'Magnet', nPower <= 0 ? 'bless' : 'curse');
		this.setLevel(nPower);
	},
github Laboralphy / h5-raycaster-lab / servers / mw / node_modules / mwgame / Effects / Power.js View on Github external
__construct: function(nPower) {
		O2.parent(this, 'Power', nPower > 0 ? 'bless' : 'curse');
		this.setLevel(nPower);
	},
github Laboralphy / h5-raycaster-lab / servers / mw / node_modules / mwgame / Effects / Defense.js View on Github external
__construct: function(nLevel) {
		O2.parent(this, 'Defense', nLevel > 0 ? 'bless' : 'curse');
		this.setLevel(nLevel);
	},
github Laboralphy / h5-raycaster-lab / servers / mw / node_modules / mwgame / Effects / Cooldown.js View on Github external
__construct: function(value) {
		O2.parent(this, 'Cooldown', value > 0 ? 'curse' : 'bless');
		this.setLevel(value);
	},
github Laboralphy / h5-raycaster-lab / servers / mw / node_modules / mwgame / Items / wand_imp.js View on Github external
fire: function(ctx) {
		O2.parent(this, ctx);
		var m, e;
		if (ctx.missiles) {
			for (var i = 0; i < ctx.missiles.length; ++i) {
				m = ctx.missiles[i];
				e = m.getData('effects');
				e.push(new Effect.Damage(Utils.rand(5, 10)));
			}
		}
	}
});
github Laboralphy / h5-raycaster-lab / servers / mw / node_modules / mwgame / Items / wand_succubus.js View on Github external
fire: function(ctx) {
		O2.parent(this, ctx);
		var m, e;
		if (ctx.missiles) {
			for (var i = 0; i < ctx.missiles.length; ++i) {
				m = ctx.missiles[i];
				e = m.getData('effects');
				e.push(new Effect.Damage(Utils.rand(10, 15)));
			}
		}
	}
});
github Laboralphy / h5-raycaster-lab / servers / mw / node_modules / mwgame / Items / weapon_sword.js View on Github external
fire: function(ctx) {
		O2.parent(this, ctx);
		var m, e;
		if (ctx.missiles) {
			for (var i = 0; i < ctx.missiles.length; ++i) {
				m = ctx.missiles[i];
				e = m.getData('effects');
				e.push(new Effect.PhysicalDamage(Utils.rand(10, 15)));
			}
		}
	}
});
github Laboralphy / h5-raycaster-lab / servers / mw / node_modules / mwgame / Items / book_bouncingorb.js View on Github external
use: function(ctx) {
		O2.parent(this, ctx);
		if (ctx.missiles && ctx.missiles.length) {
			ctx.missiles.forEach(function(m) {
				m.bInstable = false;
				m.bSlideWall = true;
				m.bBouncing = true;
				m.setData('reflected', true);
			});
		}
	}
github Laboralphy / h5-raycaster-lab / servers / mw / node_modules / mwgame / Items / Abstract / Book.js View on Github external
use: function(ctx) {
		if (this.checkCooldown(ctx)) {
			O2.parent(this, ctx);
		}
		ctx.consume = false;
	},

o2

Node.js module export for o2.js JavaScript Framework

MIT
Latest version published 12 years ago

Package Health Score

45 / 100
Full package analysis

Popular o2 functions