public Checkpoint(Vector3 coordinates, OnEnterCheckpointDelegate enterDelegate, int dimension = 0) { entrance = API.shared.createMarker(0, coordinates, new Vector3(), new Vector3(), new Vector3(1, 1, 1), 255, 255, 0, 0, dimension); shape = API.shared.createSphereColShape(coordinates, range); shape.onEntityEnterColShape += EntityEnteredCheckpoint; OnEnterCheckPointEvent += enterDelegate; }
private Checkpoint(Vector3 coords, OnEnterCheckpointDelegate enterDelegate, OnExitCheckpointDelegate exitDelegate, int markerType, int dimension, float scaleX, float scaleY, float scaleZ, int alpha, int colorR, int colorG, int colorB, bool popUpAndDown) { entrance = API.shared.createMarker(markerType, coords, new Vector3(), new Vector3(), new Vector3(scaleX, scaleY, scaleZ), alpha, colorR, colorG, colorB, dimension, popUpAndDown); shape = API.shared.createSphereColShape(coords, range * Math.Max(scaleX, scaleY)); shape.onEntityEnterColShape += EntityEnteredCheckpoint; shape.onEntityExitColShape += EntityExitedCheckpoint; OnEnterCheckPointEvent += enterDelegate; OnExitCheckPointEvent += exitDelegate; }
public ClientCheckpoint(int id, Client client, Vector3 coords, int type, OnEnterCheckpointDelegate delegate1, OnExitCheckpointDelegate delegate2) { this.id = id; this.client = client; shape = API.shared.createSphereColShape(coords, range); shape.onEntityEnterColShape += EntityEnteredCheckpoint; shape.onEntityExitColShape += EntityExitedCheckpoint; this.onEnterCheckpointEvent += delegate1; this.onExitCheckpointEvent += delegate2; // Send info to client with triggerClientCommand, need to send id too API.shared.triggerClientEvent(client, "EVENT_CREATE_CHECKPOINT", id, coords, type, 255, 0, 0); }
public Checkpoint(Vector3 coordinates, OnEnterCheckpointDelegate enterDelegate, OnExitCheckpointDelegate exitDelegate, int type, float scale, int colorR, int colorG, int colorB, int dimension = 0) : this(coordinates, enterDelegate, exitDelegate, type, dimension, scale, scale, 1, 255, colorR, colorG, colorB, false) { }
public Checkpoint(Vector3 coordinates, OnEnterCheckpointDelegate enterDelegate, OnExitCheckpointDelegate exitDelegate, int dimension = 0) : this(coordinates, enterDelegate, exitDelegate, 0, dimension, 1, 1, 1, 255, 255, 0, 0, false) { }