Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin authored and Martin committed Jun 3, 2011
1 parent 89553c8 commit 58fe3ed
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
7 changes: 7 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
<linkedResources>
<link>
<name>todo_ArcadeJS.txt</name>
<type>1</type>
<location>C:/Privat/Martin/My Dropbox/todo_ArcadeJS.txt</location>
</link>
</linkedResources>
</projectDescription>
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
Web Site http://wwWendt.de/jsripoff


Arcade.js is ...
Arcade.js is a 2d game engine based on JavaScript and HTML5 Canvas.

Part of the distribution is
Part of the distribution is

- lina.js
An independent object oriented library for points, vectors, and homogeneous
Expand All @@ -22,7 +22,7 @@ Arcade.js is ...
- arcade.js
A 2D game engine that provides a render loop and support for multiple
moving objects.
- Rip-off clone
- Demos, for example Rip-off:
A port of the Rip-Off arcade game written by Tim Skelly / Cinematronix in
1980.

Expand Down
14 changes: 9 additions & 5 deletions src/arcade.js/arcade.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,9 +1066,10 @@ var ArcadeJS = Class.extend(
} else if(object1.hidden || object2.hidden || object1._dead || object2._dead ) {
return false;
}
var id1 = ""+object1.id, id2 = ""+object2.id;
var tag = (id1 < id2) ? id1 + "~" + id2 : id2 + "~" + id1;
var cc = this.frameCache.collisionCache;
var id1 = ""+object1.id,
id2 = ""+object2.id,
tag = (id1 < id2) ? id1 + "~" + id2 : id2 + "~" + id1,
cc = this.frameCache.collisionCache;
// This pair was already checked
if( cc[tag] ) {
return false;
Expand Down Expand Up @@ -1492,8 +1493,9 @@ var Movable = Class.extend(
// Set options
this.opts = $.extend(true, {}, Movable.defaultOptions, opts);
// TODO: required?
if(opts)
if(opts){
this.opts.debug = $.extend({}, Movable.defaultOptions.debug, opts.debug);
}
opts = this.opts;
// Copy some options as direct attributes
this.pos = opts.pos ? new Point2(opts.pos) : new Point2(0, 0);
Expand All @@ -1511,7 +1513,9 @@ var Movable = Class.extend(
/**Defines, what happens when object leaves the viewport to the left or right.
* Values: ('none', 'wrap', 'stop', 'bounce')*/
this.clipModeX = opts.clipModeX || "none";
/**@See clipModeX*/
/**Defines, what happens when object leaves the viewport to the left or right.
* @See clipModeX
* */
this.clipModeY = opts.clipModeY || "none";
this._timeout = null; //+opts.timeout;

Expand Down
1 change: 1 addition & 0 deletions src/demos/rip-off/jsRipOff.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ var Bandit = Movable.extend({
// Reached a canister: attach and run home
this.canister = target;
var targetPos = new Point2(this.pos.x + LinaJS.random(-100, 100), -50);
// flee to bottom if this is nearer
if(this.pos.y > 240){
targetPos.y = 530;
}
Expand Down

0 comments on commit 58fe3ed

Please sign in to comment.