public AddOverlaysOnPaintEventArgs(ChartControl chart, DrawingContext gfx, m4x4 chart_to_client, EZone zone) { Chart = chart; Gfx = gfx; ChartToClient = chart_to_client; Zone = zone; }
private void UnlockState(EZone p_zone) { var planetZone = m_planetZones.Find(z => z.Zone == p_zone); planetZone.CurrentState++; planetZone.CurrentState = Mathf.Clamp(planetZone.CurrentState, -1, m_numberOfLockedStates - 1); m_props[p_zone][planetZone.CurrentState].ForEach(p => p.Show()); if (planetZone.CurrentState == m_numberOfLockedStates - 1) { planetZone.Unlocked = true; if (CheckGameEnd()) { m_endGameEffect.PlayEffect(); } else { m_zoneRepairedEffect.Play(); } // Play all particle systems when unlocking whole zone for (int i = 0; i < m_props[p_zone].Count; i++) { foreach (var go in m_props[p_zone][i]) { if (go.TryGetComponent(out ParticleSystem particleSystem)) { particleSystem.Play(); } } } } }
private void LockState(EZone p_zone) { var planetZone = m_planetZones.Find(z => z.Zone == p_zone); m_props[p_zone][planetZone.CurrentState].ForEach(p => p.Hide()); planetZone.CurrentState--; planetZone.CurrentState = Mathf.Clamp(planetZone.CurrentState, -1, m_numberOfLockedStates - 1); }
private void HandleIndex(EZone type, XElement ele, string mod) { switch (mod) { case ("EEffect"): { this.HandleEEffect(ele, type); } break; case ("Sprites"): { this.HandleSprites(ele, type); } break; } }
public HitTestResult(EZone zone, Point client_point, Point chart_point, ModifierKeys modifier_keys, EMouseBtns mouse_btns, IEnumerable <Hit> hits, View3d.Camera cam) { Zone = zone; ClientPoint = client_point; ChartPoint = chart_point; Hits = hits.ToList(); ModifierKeys = modifier_keys; MouseBtns = mouse_btns; Camera = cam; }
private void HandleEEffect(XElement el, EZone type) { var effectType = EEffect.None; if (EnumUtil <EEffect> .TryGetEnumValue(el.Value, ref effectType)) { var effect = EffectBuilder.Instance.BuildEffect(el, effectType); this.ZoneTable.Table[type].Effects.Add(effect); } }
public AZone CreateNewObject(EZone type) { var zoneBuilder = new ZoneBuilder(); switch (type) { case (EZone.Spear_Wall_Zone): { return(zoneBuilder.Build(new SpearWallZone())); } case (EZone.Slime_Zone): { return(zoneBuilder.Build(new SlimeZone())); } default: return(null); } }
private void HandleSprites(XElement el, EZone type) { var table = ZoneTable.Instance.Table; var csv = el.Value.ToString().Split(','); foreach (var v in csv) { int result = 0; if (int.TryParse(v, out result)) { table[type].Sprites.Add(result); } } }
public AZone(EZone type) { this._data = new ZoneData(); this._type = type; }