Beispiel #1
0
 public void Init()
 {
     _systems.Add(new SpawnpointViewCreatingSystem(_contexts, new GameObject(), new GameObject()));
     _spawnpoint = _contexts.tile.CreateEntity();
     _spawnpoint.AddSpawnpoint(1);
     _spawnpoint.AddView(new GameObject());
 }
 public void Init()
 {
     _systems.Add(new SpawnpointViewDestroySystem(_contexts));
     _spawnpoint = _contexts.tile.CreateEntity();
     _spawnpoint.AddSpawnpoint(1);
     _spawnpoint.AddView(new GameObject());
     _spawnpoint.AddMapEditorSpawnpointView(new GameObject());
 }
Beispiel #3
0
        private void SetTileSpawnpoint(TileEntity entity, int index)
        {
            RemoveMapSpawnpoint(index);

            if (entity.hasSpawnpoint)
            {
                Debug.Log("Spawnpoint replaced " + entity.spawnpoint.index + "=>" + index + " : " + entity.mapPosition);
                entity.ReplaceSpawnpoint(index);
            }
            else
            {
                Debug.Log("Spawnpoint set " + index + " : " + entity.mapPosition);
                entity.AddSpawnpoint(index);
            }
        }