public GroundMarker AddGroundMarker(KSPOrbitModule.GeoCoordinates geoCoordinates,
                                                KSPConsoleModule.RgbaColor color, double rotation)
            {
                GroundMarker groundMarker = new GroundMarker(geoCoordinates, color, rotation);

                KSPContext.CurrentContext.AddMarker(groundMarker);

                return(groundMarker);
            }
Example #2
0
    public GameObject SetupMarkerForPlace(BeamPlace p)
    {
        int        posHash = p.PosHash;
        GameObject marker  = null;

        try {
            marker = activeMarkers[posHash];
        } catch (KeyNotFoundException) {
            marker = idleMarkers.Count > 0 ? idleMarkers.Pop() : GameObject.Instantiate(markerPrefab, Vector3.zero, Quaternion.identity) as GameObject;
            marker.transform.parent = transform;
            activeMarkers[posHash]  = marker;
        }
        marker.transform.position = utils.Vec3(p.GetPos());
        GroundMarker gm = (GroundMarker)marker.transform.GetComponent("GroundMarker");

        gm.SetColor(utils.hexToColor(p.bike.team.Color));
        marker.SetActive(true);
        return(marker);
    }
Example #3
0
 public YieldInstruction _MoveToMarker(GroundEntity ent, GroundMarker mark, bool run = false, int speed = 2)
 {
     return(_MoveToPosition(ent, mark.X, mark.Y, run, speed));
 }