示例#1
0
文件: GridCell.cs 项目: FeXyK/Authory
        public void Add(TeleportEntity teleport)
        {
            teleport.SetId(_next_id);

            if (ResourceEntites.TryAdd(teleport.Id, teleport))
            {
                _next_id++;

                teleport.SetGridCell(this);
                EntityCount++;
                AllEntityCount++;
            }
        }
示例#2
0
        private void InitTeleporter(Vector3 position, float radius, int targetMapIndex)
        {
            TeleportEntity teleport = new TeleportEntity(this, targetMapIndex, position, radius);

            Data.Add(teleport);
        }
示例#3
0
 public void Add(TeleportEntity teleport)
 {
     GetGridCellByPosition(teleport.Position).Add(teleport);
 }