Exemplo n.º 1
0
        private void SpawnLevelObject(LevelObjectTemplate levelObject)
        {
            var obj = GameObject.Instantiate(levelObject, this);

            SpawnerComponent spawner = default;

            if (levelObject.LegoInfo.TryGetValue("loadSrvrOnly", out var serverOnly) && (bool)serverOnly ||
                levelObject.LegoInfo.TryGetValue("carver_only", out var carverOnly) && (bool)carverOnly ||
                levelObject.LegoInfo.TryGetValue("renderDisabled", out var disabled) && (bool)disabled)
            {
                obj.Layer = StandardLayer.Hidden;
            }
Exemplo n.º 2
0
 /// <summary>
 /// Add a new spawner node to this network.
 /// </summary>
 /// <param name="component">Spawner component to add.</param>
 public void AddSpawnerNode(SpawnerComponent component)
 {
     SpawnerNodes.Add(component);
 }