Began trying to figure out the best way to do interactions.

This commit is contained in:
Robbie Antenesse 2016-04-09 20:12:16 -06:00
parent 7012f201ab
commit 5b5465ab97
1 changed files with 10 additions and 1 deletions

View File

@ -60,7 +60,16 @@ pr_ship.AfterDo = 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 () {