- //le coeur du script:: aucune variable pour la direction du clip!!!
-
- if (int(this._rotation) == -90) {
- setProperty (this, _x, this._x+5);
- } else if (int(this._rotation) == 90) {
- setProperty (this, _x, this._x-5);
- } else if (int(this._rotation) == 180) {
- setProperty (this, _y, this._y-5);
- } else if (int(this._rotation) == 0) {
- setProperty (this, _y, this._y+5);
- } else {
- setProperty (this, _rotation, 0);
- }
- if (_root.map.rect.hitTest(this._x + _root.map._x, this._y + _root.map._y, true) == true) {
- if (int(this._rotation) == -90) {
- setProperty (this, _x, this._x-5+2);
- setProperty (this, _rotation, 0);
- } else if (int(this._rotation) == 90) {
- setProperty (this, _x, this._x+5+2);
- setProperty (this, _rotation, 180);
- } else if (int(this._rotation) == 180) {
- setProperty (this, _y, this._y+5+2);
- setProperty (this, _rotation, -90);
- } else if (int(this._rotation) == 0) {
- setProperty (this, _y, this._y-5+2);
- setProperty (this, _rotation, 90);
- }
- }
//le coeur du script:: aucune variable pour la direction du clip!!!
if (int(this._rotation) == -90) {
setProperty (this, _x, this._x+5);
} else if (int(this._rotation) == 90) {
setProperty (this, _x, this._x-5);
} else if (int(this._rotation) == 180) {
setProperty (this, _y, this._y-5);
} else if (int(this._rotation) == 0) {
setProperty (this, _y, this._y+5);
} else {
setProperty (this, _rotation, 0);
}
if (_root.map.rect.hitTest(this._x + _root.map._x, this._y + _root.map._y, true) == true) {
if (int(this._rotation) == -90) {
setProperty (this, _x, this._x-5+2);
setProperty (this, _rotation, 0);
} else if (int(this._rotation) == 90) {
setProperty (this, _x, this._x+5+2);
setProperty (this, _rotation, 180);
} else if (int(this._rotation) == 180) {
setProperty (this, _y, this._y+5+2);
setProperty (this, _rotation, -90);
} else if (int(this._rotation) == 0) {
setProperty (this, _y, this._y-5+2);
setProperty (this, _rotation, 90);
}
}