Exemplo n.º 1
0
 public static void RemoveUnit(FowUnit viewer)
 {
     if (_instance.UnitList.Contains(viewer))
     {
         _instance.UnitList.Remove(viewer);
     }
 }
Exemplo n.º 2
0
 /***********************************************************************
 *                               Static Methods (Add/Remove)
 ***********************************************************************/
 #region .
 public static void AddUnit(FowUnit unit)
 {
     if (!_instance.UnitList.Contains(unit))
     {
         _instance.UnitList.Add(unit);
     }
 }
Exemplo n.º 3
0
        /// <summary> 대상 유닛의 위치를 타일좌표(x, y, height)로 환산 </summary>
        private TilePos GetTilePos(FowUnit unit)
        {
            int   x      = (int)((unit.transform.position.x - transform.position.x + _fogWidthX * 0.5f) / _tileSize);
            int   y      = (int)((unit.transform.position.z - transform.position.z + _fogWidthZ * 0.5f) / _tileSize);
            float height = unit.transform.position.y;

            return(new TilePos(x, y, height));
        }