protected override void Start() { //at the start set all Enemy names to their health ui text Name.text = base.characterName; marker = GetComponent <SelectMarker>(); base.Start(); }
private void btn_StartPathFinding_Click(object sender, EventArgs e) { if (startNode == null || endNode == null) { MessageBox.Show("缺少 起点 或 终点!!!"); return; } selectMarker = SelectMarker.None; ResetParentNode(nodeMap); ResetPoint("path"); openList.Clear(); closeList.Clear(); FindPath(); }
// Use this for initialization void Start() { m_PlayerUnit = new PlayerMarker(); //PlayerRigidBody = this.GetComponent<Rigidbody>(); m_PlayerUnit.Body = PlayerRigidBody; OnFinish = delegate { //TODO stateMachine.ChangeState(PlayerCountState); }; m_SelectUnit = new SelectMarker(); m_SelectUnit.Body = MarkerRigidBody; m_PlayerUnit.SelectPosition = m_PlayerUnit.NewPosition = m_SelectUnit.SelectPosition = m_SelectUnit.NewPosition = transform.position; ((IGridMover)m_Mover).SetMap(null); }
private void button_Reset_Click(object sender, EventArgs e) { List <Control> buttonList = new List <Control>(); foreach (Control ctl in Controls) { if (ctl.Tag != null) { buttonList.Add(ctl); } } foreach (var button in buttonList) { button.BackColor = SystemColors.Control; button.Tag = null; } selectMarker = SelectMarker.None; ResetAllNodes(nodeMap); startNode = null; endNode = null; }
private void btn_SetBarriers_Click(object sender, EventArgs e) { selectMarker = SelectMarker.Barrier; }
private void btn_SelectEndPoint_Click(object sender, EventArgs e) { selectMarker = SelectMarker.End; }
private void btn_SelectStartPoint_Click(object sender, EventArgs e) { selectMarker = SelectMarker.Start; }