C# Класс AbstractedSheep.ShuttleTrackerWorld.World

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddOrUpdateShuttle ( int shuttleId, Coordinate location, string name, int bearing, string cardinalPoint, int speed, int route = -1 ) : void

Adds a shuttle to the world or updates the position of an existing shuttle.

GenerateWorld ( Netlink n ) : World

Create a world object from a Netlink object.

RemoveOldShuttles ( ) : void

Removes all shuttles older than SHUTTLE_EXPIRATION_TIME

Приватные методы

Метод Описание
AddRoute ( RouteJson route ) : void
AddRoute ( int routeId, string name, List coords ) : void
AddStop ( StopJson stop ) : void
AddStop ( string stopId, Coordinate location, string name, List routes ) : void
CurrentTimeMillis ( ) : long
World ( ) : System

Описание методов

AddOrUpdateShuttle() публичный Метод

Adds a shuttle to the world or updates the position of an existing shuttle.
public AddOrUpdateShuttle ( int shuttleId, Coordinate location, string name, int bearing, string cardinalPoint, int speed, int route = -1 ) : void
shuttleId int The ID number of the shuttle.
location Coordinate The shuttle's current location.
name string The name of the shuttle.
bearing int The heading of the shuttle in degrees from north.
cardinalPoint string The heading of the shuttle as a cardinal direcation (e.g. Northwest).
speed int The speed of the shuttle in miles per hour.
route int The id of the shuttle route. -1 indicates that the shuttle is not on a route.
Результат void

GenerateWorld() публичный статический Метод

Create a world object from a Netlink object.
public static GenerateWorld ( Netlink n ) : World
n Netlink The Netlink class that represents the Netlink JSON.
Результат World

RemoveOldShuttles() публичный Метод

Removes all shuttles older than SHUTTLE_EXPIRATION_TIME
public RemoveOldShuttles ( ) : void
Результат void