protected override void OnUpdate() { EntityQuery eq = GetEntityQuery(ComponentType.ReadOnly <ClickPoint>()); var ecb = ess.CreateCommandBuffer(); using (var clickPoints = eq.ToComponentDataArray <ClickPoint>(Allocator.TempJob)) { if (clickPoints.Length == 0) { return; } ClickPoint click = clickPoints[0]; int2 clickIndex = SpawnerMono.PositionToIndex(click.position); Entities.ForEach((Entity e, in JewelCell cell) => { if (cell.x == clickIndex.x && cell.y == clickIndex.y) { ecb.AddComponent(e, new JewelSelected()); } }).Run(); } }
public void Played(ClickPoint point) { firstTurn = false; usedPoint.Add(new Vector2(point.transform.position.x, point.transform.position.z), point); map[Convert.ToInt32(point.transform.position.x)][Convert.ToInt32(point.transform.position.z)] = (Cases)Convert.ToInt32(playTurn); CheckCapture(Convert.ToInt32(point.transform.position.x), Convert.ToInt32(point.transform.position.z), (Cases)Convert.ToInt32(playTurn)); CheckWin(Convert.ToInt32(point.transform.position.x), Convert.ToInt32(point.transform.position.z), (Cases)Convert.ToInt32(playTurn)); playTurn = !playTurn; }
private void AddCustomerSkill(ClickPoint cb, CustomSkill skill) { if (cb != null) { var addindex = cb.battler.timeline.FindIndex(n => n == cb.skill); if (0 <= addindex) { cb.battler.timeline.Insert(addindex + 1, skill); } } }
/// <summary> /// A cursor, since XNA doesn't draw one. /// Bryan Patzke, 2008 /// </summary> /// <param name="cursorImage">The resource keu for the cursor image.</param> /// <param name="Position">The corner of the pointer that represents the cursor's hotspot.</param> /// <returns></returns> public Cursor(string cursorImage, ClickPoint cursorPosition) : base() { mCursorImage = ResourceGetTexture2D(cursorImage); ClickPosition = cursorPosition; mSpriteBatch = new SpriteBatch(theGame.Graphics.GraphicsDevice); mSourceRect = new Rectangle(0, 0, mCursorImage.Width, mCursorImage.Height); ObjectDepth = int.MinValue; // turn off normal cursor visibility theScene.MouseVisibility(false); }
private void TimelineForm_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { System.Drawing.Point p = System.Windows.Forms.Cursor.Position; clickpoint = clickablepoint.Find(n => n.rect.Contains(e.Location)); if (clickpoint != null) { resetToolStripMenuItem.Enabled = clickpoint.skill.darty; deleteDataToolStripMenuItem.Enabled = Deleteable(clickpoint.skill); //指定した画面上の座標位置にコンテキストメニューを表示する this.contextMenuStrip1.Show(p); } } }
public AddEditForm(ClickPoint item, bool isEditMode = false) { InitializeComponent(); ApplyConfig(); if (isEditMode) { tbName.Text = item.Name; } else { tbName.Text = String.Format( "Point {0}-{1}", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString()); } nudX.Value = item.X; nudY.Value = item.Y; }
public bool isPlayable(ClickPoint point) { if (finish == true) { return(false); } if (firstTurn == true && (point.transform.position.x != 9 || point.transform.position.z != 9)) { gameUI.UpdateRulesText("First player must play at the middle"); Invoke("ClearRules", 5f); return(false); } if (CheckDouble((int)point.transform.position.x, (int)point.transform.position.z, (Cases)Convert.ToInt32(playTurn)) == true) { gameUI.UpdateRulesText("Double-Three are forbidden"); Invoke("ClearRules", 5f); return(false); } return(true); }
private void Update() { ClickPoint.Update(); }
public void Execute() { ClickPoint.Update(); KeyView.Update(); }
public bool isPlayable(ClickPoint point) { if (finish == true) return false; if (firstTurn == true && (point.transform.position.x != 9 || point.transform.position.z != 9)) { gameUI.UpdateRulesText("First player must play at the middle"); Invoke("ClearRules", 5f); return false; } if (CheckDouble((int)point.transform.position.x, (int)point.transform.position.z, (Cases)Convert.ToInt32(playTurn)) == true) { gameUI.UpdateRulesText("Double-Three are forbidden"); Invoke("ClearRules", 5f); return false; } return true; }