public void PutCell(K1 k1, K2 k2, C c) { int i1 = 0; if (!Keys1.TryGetBySecond(k1, out i1)) { int new1 = Keys1.First.Any() ? Keys1.First.Max() + 1 : 0; Keys1.Add(new1, k1); i1 = new1; } int i2 = 0; if (!Keys2.TryGetBySecond(k2, out i2)) { int new2 = Keys2.First.Any() ? Keys2.First.Max() + 1 : 0; Keys2.Add(new2, k2); i2 = new2; } var tuple = new Tuple <int, int>(i1, i2); Cells.Remove(tuple); Cells.Add(tuple, c); }
public void ProcessCmdKey(Keys2 keyData) { switch (keyData) { case Keys2.Control | Keys2.A: GraphModel.SelectAllNodes(); GraphModel.FireSelectionChange(true, 0); control.Invalidate(true); break; case Keys2.Up: GraphModel.MoveUp(5); control.Invalidate(true); break; case Keys2.Down: GraphModel.MoveDown(5); control.Invalidate(true); break; case Keys2.Left: GraphModel.MoveLeft(5); control.Invalidate(true); break; case Keys2.Right: GraphModel.MoveRight(5); control.Invalidate(true); break; } }
public IEnumerable <RFDataCell> GetCells() { return(Cells.Select(c => new RFDataCell { K1 = Keys1.GetByFirst(c.Key.Item1), K2 = Keys2.GetByFirst(c.Key.Item2), C = c.Value })); }
void Start() { anim = GetComponent <Animator>(); keysA = chave1.GetComponent <Keys>(); keysB = chave2.GetComponent <Keys2>(); abre1 = keysA.abreportao; Debug.Log(abre1); abre2 = keysB.abreportao2; Debug.Log(abre2); }
public C GetCell(K1 k1, K2 k2) { if (Keys1.ContainsSecond(k1) && Keys2.ContainsSecond(k2)) { var i1 = Keys1.GetBySecond(k1); var i2 = Keys2.GetBySecond(k2); var tuple = new Tuple <int, int>(i1, i2); if (Cells.ContainsKey(tuple)) { return(Cells[tuple]); } } return(default(C)); }
public Flask(bool vis, Name _name, Keys2 _key, int _qual) { visible = vis; name = _name; key = _key; qual = _qual; flaskImageLocation = "FlaskImages\\" + name + ".png"; if (name == Name.Quicksilver_Flask || name == Name.Ruby_Flask || name == Name.Saphire_Flask || name == Name.Topaz_Flask || name == Name.Diamond_Flask || name == Name.Granite_Flask || name == Name.Jade_Flask || name == Name.Jade_Flask || name == Name.Sulphur_Flask || name == Name.Lions_Roar || name == Name.Taste_of_Hate) { baseDuration = 4; } else if (name == Name.Bismuth_Flask || name == Name.Stibnite_Flask || name == Name.Silver_Flask || name == Name.Aquamarine_Flask || name == Name.Basalt_Flask) { baseDuration = 5; } else if (name == Name.Amethyst_Flask || name == Name.Atziris_Promise) { baseDuration = 3.5; } usable = true; useDuration = 0; }