Example #1
0
    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();
    }
Example #2
0
 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();
 }
Example #3
0
    // 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);
    }
Example #4
0
        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;
        }
Example #5
0
 private void btn_SetBarriers_Click(object sender, EventArgs e)
 {
     selectMarker = SelectMarker.Barrier;
 }
Example #6
0
 private void btn_SelectEndPoint_Click(object sender, EventArgs e)
 {
     selectMarker = SelectMarker.End;
 }
Example #7
0
 private void btn_SelectStartPoint_Click(object sender, EventArgs e)
 {
     selectMarker = SelectMarker.Start;
 }