Began trying to figure out the best way to do interactions.
This commit is contained in:
parent
7012f201ab
commit
5b5465ab97
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue