Пример #1
0
 public bool ReachNextPoint()
 {
     if (curPathNum + 1 >= pathInfo.GetCount())
     {
         return(false);
     }
     curPathNum++;
     return(true);
 }
Пример #2
0
    public void AddTowerByData()
    {
        PathInfo towerPosInfo = pathLoader.GetPath("Tower");
        int      count        = towerPosInfo.GetCount();

        for (int i = 0; i < count; i++)
        {
            Vector3   pos   = towerPosInfo.GetPoint(i);
            TowerInfo tower = EntityManager.getInstance().AddTower(100);
            tower.SetPosition(pos.x, pos.y, 0);
            tower.ChangeState("idle");
        }
    }