public CarGPSSpotStatusChangeReqPacket(GPSSpotManagerChangeType gPSSpotManagerChangeType, object value) : this() { GPSSpotManagerChangeType = gPSSpotManagerChangeType; switch (gPSSpotManagerChangeType) { case GPSSpotManagerChangeType.AddSpot: GPSPosition = value as GPSPosition; break; case GPSSpotManagerChangeType.RemoveSpot: Index = (int)value; break; case GPSSpotManagerChangeType.SetCurrentPos: Index = (int)value; break; case GPSSpotManagerChangeType.OverWrite: GPSMover = value as GPSSpotManager; break; default: break; } }
public void _new(BaseCarDivice baseCarDivice) { GPSSpotManager = new GPSSpotManager(0); //GPSSpotManager.AddPos(new GPSsPosition(10, 10).GetGPSPosition()); carDivice = baseCarDivice; EnableTraceMode = true; CurrentMoveSequence = MoveSequence.ForcedForward; carDivice.statusparser.OnParsedSOP += Statusparser_OnParsedSOP; }
public void RanderList(GPSSpotManager gPSSpotManager) { DeleteChildObject(); SetContentHeight(gPSSpotManager.GPSPositions.Count); for (int i = 0; i < gPSSpotManager.GPSPositions.Count; i++) { GameObject go = AddItemAt(i); go.GetComponent <PosItemLinkerObj>().Name.text = gPSSpotManager.GPSPositions[i].LocationName; go.GetComponent <PosItemLinkerObj>().SetDisplayPosition(i, gPSSpotManager.GPSPositions[i]); if (i == gPSSpotManager.CurrentMovePosIndex) { go.GetComponent <PosItemLinkerObj>().HighLight.SetActive(true); } } }
public void ChangeSpotManager(GPSSpotManager gPSSpotManager) { GPSSpotManager = gPSSpotManager; }