Began trying to figure out the best way to do interactions.
This commit is contained in:
parent
7012f201ab
commit
5b5465ab97
1 changed files with 10 additions and 1 deletions
|
@ -60,7 +60,16 @@ pr_ship.AfterDo = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_ship.CheckInteraction = function () {
|
pr_ship.CheckInteraction = function () {
|
||||||
|
if (ct_confirm().down) {
|
||||||
|
var objectsFound = OS.GameObjectsAtPoint(this.pointInFront.x, this.pointInFront.y);
|
||||||
|
if (objectsFound.length > 0) {
|
||||||
|
for (var i = 0; i < objectsFound.length; i++) {
|
||||||
|
if (objectsFound[i].canTrade) {
|
||||||
|
// open the trading screen for the island.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_ship.CheckMovement = function () {
|
pr_ship.CheckMovement = function () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue