Example #1
0
 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;
 }
Example #2
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)
 {
 }
Example #3
0
 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)
 {
 }
Example #4
0
        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);
        }