Exemple #1
0
        private void Start()
        {
            GameObject l_navigationObject = GameObject.Instantiate(LevelInitializationDefinition.NavigationGraphObjectPrefab, LevelInitializationGameObject.LevelGlobalObjects.transform, false);
            NavigationGraphComponent l_navigationGraphComponent = l_navigationObject.GetComponent <NavigationGraphComponent>();

            l_navigationGraphComponent.NavigationGraphAsset = LevelInitializationDefinition.NavigationGraphAssetsPick[0];
            l_navigationObject.SetActive(true);

            EntitySpawnDefinition.spawnEntities(LevelInitializationDefinition.EntitySpawnDefinition, LevelInitializationGameObject.Entities.transform);
            GameObject.Instantiate(LevelInitializationDefinition.TurnTimelinePrefab, LevelInitializationGameObject.LevelGlobalObjects.transform, false);
        }
Exemple #2
0
        public static void spawnEntities(EntitySpawnDefinition p_entitySpawnDefinition, Transform p_parent)
        {
            for (int i = 0; i < p_entitySpawnDefinition.RandomEntityNumber; i++)
            {
                GameObject.Instantiate(p_entitySpawnDefinition.EntityPrefab, p_parent);
            }

            for (int i = 0; i < p_entitySpawnDefinition.NumberOfHealthEntity; i++)
            {
                GameObject.Instantiate(p_entitySpawnDefinition.HealthEntityPrefab, p_parent);
            }
        }