Пример #1
0
        void AddInvader()
        {
            var actor = Instantiate(InvaderPrefabs.PickOne(), NPCContainer);

            actor.transform.position = InvaderSpawnPoint.position;
            actor.Initialize(Game, NavigationSpots, InvaderSpawnPoint);
            ActorRepository.AddNPC(actor);
        }
Пример #2
0
        private void SpawnExorcist(SpookItem targetItem)
        {
            exorcistAtHome = true;
            if (exorcist == null)
            {
                exorcist = Instantiate(ExorcistPrefab, NPCContainer);
                exorcist.transform.position = InvaderSpawnPoint.position;
                ActorRepository.AddNPC(exorcist);
            }

            exorcist.gameObject.SetActive(true);
            exorcist.Initialize(NavigationPoints, InvaderSpawnPoint, targetItem, ExorcistLeaves);
        }