void SwitchMarker(MarkerColour m) { if (currentGroundMarker == null) { currentGroundMarker = Instantiate(GroundMarker); } if (m == MarkerColour.Green) { ParticleSystem.MainModule te = currentGroundMarker.GetComponentInChildren <RFX4_EffectSettingColor>().GetComponent <ParticleSystem>().main; te.startColor = GroundMarkerGreen; ParticleSystem.MainModule t = currentGroundMarker.GetComponentInChildren <RFX4_Turbulence>().GetComponent <ParticleSystem>().main; t.startColor = GroundMarkerGreen; if (previousSelection.go.GetComponent <HumanController>() != null) { previousSelection.go.GetComponent <HumanController>().whirlwind.GetComponent <RFX4_EffectSettingColor>().Color = GroundMarkerGreen; } else if (previousSelection.go.GetComponent <tombstoneController>() != null) { previousSelection.go.GetComponent <tombstoneController>().beam.GetComponent <RFX4_EffectSettingColor>().Color = GroundMarkerGreen; } } else if (m == MarkerColour.Red) { ParticleSystem.MainModule te = currentGroundMarker.GetComponentInChildren <RFX4_EffectSettingColor>().GetComponent <ParticleSystem>().main; te.startColor = GroundMarkerRed; ParticleSystem.MainModule t = currentGroundMarker.GetComponentInChildren <RFX4_Turbulence>().GetComponent <ParticleSystem>().main; t.startColor = GroundMarkerRed; if (previousSelection.go.GetComponent <HumanController>() != null) { previousSelection.go.GetComponent <HumanController>().whirlwind.GetComponent <RFX4_EffectSettingColor>().Color = GroundMarkerRed; } else if (previousSelection.go.GetComponent <tombstoneController>() != null) { previousSelection.go.GetComponent <tombstoneController>().beam.GetComponent <RFX4_EffectSettingColor>().Color = GroundMarkerRed; } } else if (m == MarkerColour.Blue) { ParticleSystem.MainModule te = currentGroundMarker.GetComponentInChildren <RFX4_EffectSettingColor>().GetComponent <ParticleSystem>().main; te.startColor = GroundMarkerBlue; ParticleSystem.MainModule t = currentGroundMarker.GetComponentInChildren <RFX4_Turbulence>().GetComponent <ParticleSystem>().main; t.startColor = GroundMarkerBlue; if (previousSelection.go.GetComponent <HumanController>() != null) { previousSelection.go.GetComponent <HumanController>().whirlwind.GetComponent <RFX4_EffectSettingColor>().Color = GroundMarkerBlue; } else if (previousSelection.go.GetComponent <tombstoneController>() != null) { previousSelection.go.GetComponent <tombstoneController>().beam.GetComponent <RFX4_EffectSettingColor>().Color = GroundMarkerBlue; } } markerColour = m; }
private static Uri ColourCode(MarkerColour colour) { switch (colour) { case MarkerColour.Green: return(new Uri("pack://application:,,,/src/GreenDot.png")); case MarkerColour.Red: return(new Uri("pack://application:,,,/src/RedDot.png")); case MarkerColour.Yellow: return(new Uri("pack://application:,,,/src/YellowDot.png")); case MarkerColour.GreenAffiliates: return(new Uri("pack://application:,,,/src/GreenDotAffiliates.png")); case MarkerColour.RedAffiliates: return(new Uri("pack://application:,,,/src/RedDotAffiliates.png")); case MarkerColour.YellowAffiliates: return(new Uri("pack://application:,,,/src/YellowDotAffiliates.png")); default: throw new AggregateException(); } }
public void CheckboxClicked(MarkerColour c, object checkedValue) { c.Checked = !c.Checked; OutputText(); }