this._aTest.push( [new Point(0, -1), new Point( -1, -1), new Point( -1, 0), new Point(1, 0)] );
this._aDirNext = [3, 0, 1, 2, 1, 2, 3, 0];
this._iDir = this._aDirNext[this._iDir];
private function checkMoveBug ():void { var strTest:String = ""; var i:uint; var xx:int; var yy:int; for (i = 0; i < 4; i++) { xx = this._pPos.x + this._aTest[this._iDir][i].x; yy = this._pPos.y + this._aTest[this._iDir][i].y; if (this._refChipsGame.getTile(this._refChipsGame.aMapGame[xx][yy][0]).objProperties.bMonster && this._refChipsGame.aMapGame[xx][yy][1] == -1) { strTest += "0"; } else { strTest += "1"; } } switch (strTest.substr(0, 3)) { case "000": // "C" case "100": case "110": this._iDir = this._aDirNext[this._iDir]; // turn to the next dir break; case "111": // "A" case "101": if (strTest.charAt(3) == "0") { this._iDir = this._aDirNext[this._iDir + 4]; // this one uses the second pair for "A" } else { this._iDir = this.getOppositeDir(this._iDir); // this one is used vor "D" } break /* case "011": case "001": // "B" these are not needed because we can just move ahead (there is something to the left) break; */ } }
this._aTest.push( [new Point(0, -1), new Point( 1, -1), new Point( 1, 0), new Point(-1, 0)] );
this._aDirNext = [1, 2, 3, 0, 3, 0, 1, 2];
Powered by: newtelligence dasBlog 1.9.6264.0
Disclaimer The opinions expressed herein are our personal opinions and do not represent our customer's view in anyway.
© Copyright 2009, gaming your way
E-mail