Пример #1
0
        public EnemySpawnData(int id, List <SpawnGroup> spawnGroups)
        {
            blockId        = id;
            spawnGroupData = new SpawnGroupData[spawnGroups.Count];

            for (int i = 0; i < spawnGroups.Count; i++)
            {
                spawnGroupData[i] = new SpawnGroupData(spawnGroups[i].SpawnPos, spawnGroups[i].SpawnRot);
            }
        }
Пример #2
0
        /// <summary>
        /// Translates the information in the SpawnGroupData class provided.
        /// </summary>
        /// <param name="groupData"> The data to be translated. </param>
        public void LoadData(SpawnGroupData groupData)
        {
            Init();
            SpawnPos = new Vector3[groupData.SpawnPos.Length];
            for (int i = 0; i < groupData.SpawnPos.Length; i++)
            {
                SpawnPos[i] = groupData.SpawnPos[i];
            }

            SpawnRot = groupData.SpawnRot;

            SetSpawn();
        }