Ejemplo n.º 1
0
        private IEnumerator SpawnNeoSatan()
        {
            BossFightController.SetActive(true);

            if (DisableHUD)
            {
                MainHUD.SetActive(false);
            }

            // APPLY KNOCKBACK TO NEOSATAN SPAWN AREA
            foreach (Point item in LoadSpawnArea())
            {
                handler.Execute(controller, NeoSatanSpawnPosition, item, 1);
            }

            handler.Execute(controller, new Point(this.NeoSatanSpawnPosition.x - 1, this.NeoSatanSpawnPosition.y, this.NeoSatanSpawnPosition.z), NeoSatanSpawnPosition, 1);

            do
            {
                yield return(null);
            } while (map.Contains(NeoSatanSpawnPosition));
            ActivateSoulSphere();
            // SPAWN NEO-SATAN
            NeoSatanReference = AIPlacementHelper.AddUnit(null, NeoSatanSpawnPosition, NeoSatan);
            BossFightController.GetComponent <BossFightController>().SetNeoSatanRef(NeoSatanReference);
            OnNeoSatanSpawn?.Invoke();
        }
Ejemplo n.º 2
0
        private void PlaceIntestines()
        {
            this.intestines = new List <Unit>();
            List <Point> middlePoints = PointUtils.GetVerticalMiddlePoints(this.Unit.GetPosition(), this.maskPosition);

            foreach (var item in middlePoints)
            {
                Unit intestine = AIPlacementHelper.AddUnit(this.transform.parent, item, udeukedefrukeIntestinePrefab);
                intestines.Add(intestine);
            }
        }
Ejemplo n.º 3
0
        public void UpdatePoint(Point point)
        {
            this.xPosition = point.x;
            this.yPosition = point.z;

            if (keyboardUnit != null && !whelpPrefab.UnitsMap.Contains(point))
            {
                AIPlacementHelper.AddUnit(this.transform, new Point(this.xPosition, 0, this.yPosition), keyboardUnit);
                keyboardUnit = null;
            }
        }
        private void MoveToWeakestTarget()
        {
            //// Logcat.I("There is not enemy to avoid, moving to weakest target");
            Point unit = AIUtils.GetWeakestTarget(this.Unit.UnitsMap);

            if (unit != default)
            {
                Dictionary <Point, List <Point> > allPaths = AIUtils.GetAllPaths(this.Board, this.Unit.UnitsMap, this.Unit.GetPosition(), true);
                AIPlacementHelper.MoveToTarget(this, allPaths, this.Unit, this.Range, unit);
            }
        }
Ejemplo n.º 5
0
        private void Immaculate()
        {
            Unit spawned = SpawnManager.Instance?.SpawnUnitAtRandom(UnitType.TESTAMENT);

            if (spawned == null)
            {
                return;
            }

            spawned?.gameObject.SetActive(false);
            this.immaculatedUnits.Add(spawned);
            pentagram = AIPlacementHelper.AddEffect(pentagramPrefab, this.gameObject.transform, spawned.GetPosition(), 1);
            Invoke("EnableUnit", 1.25f);
        }
Ejemplo n.º 6
0
        private IEnumerator Rebirth()
        {
            Unit prefab = GetUnit(lastEnemyKilled);

            if (prefab == null)
            {
                yield return(null);
            }

            Unit unit = AIPlacementHelper.AddUnit(null, this.Unit.GetPosition(), prefab);

            unit?.Health.SetMaxHealth(this.Unit.Health.GetTotalHealth());
            //// TODO CHECK unit?.GetComponent<IncarnatedState>()?.SwitchMaterials();
            this.transform.parent.gameObject.SetActive(false);
        }
Ejemplo n.º 7
0
        public override void Execute(Point target)
        {
            this.allPaths = AIUtils.GetAllPaths(this.Board, this.Unit.UnitsMap, this.Unit.GetPosition(), true);
            KeyValuePair <Point, int> targetUnit = AIUtils.GetClosestTarget(this.Unit.UnitsMap, this.Unit.GetPosition(), this.Range);

            if (!targetUnit.Equals(default(KeyValuePair <Point, int>)))
            {
                AIPlacementHelper.MoveToClosestTarget(this, this.validPaths, this.Unit, this.Range, targetUnit.Key);
                ((EnemyUnit)this.Unit).Target = PointUtils.GetDistance(this.Unit.GetPosition(), targetUnit.Key) <= 1 ? this.Unit.UnitsMap.Get(targetUnit.Key) : null;
                return;
            }

            Point unitPosition = GetTarget();

            AIPlacementHelper.MoveToTarget(this, this.allPaths, this.Unit, this.Range, unitPosition);
            ((EnemyUnit)this.Unit).Target = PointUtils.GetDistance(this.Unit.GetPosition(), unitPosition) <= 1 ? this.Unit.UnitsMap.Get(unitPosition) : null;
        }
Ejemplo n.º 8
0
        public void SpawnWeakenedNeoSatan()
        {
            MusicController.Instance.StopCurrentManual();
            AmbienceController.Instance.StopCurrentManual();

            SoulSphere.SetActive(false);
            // Flash white
            EffectsPostProcessingController.Instance.ApplyEffect(EffectType.ExposureFlash, 1.5f, 0.7f, 20f);
            NeoSatanRoar.PlayAudio();

            foreach (GameObject item in UiElements)
            {
                item.SetActive(false);
            }

            // Delete NeoSatan after flashing white
            neoSatanPosition = NeoSatan.GetPosition();
            RemoveNeoSatan();
            NeoSatan.GetComponentInChildren <AnimationStateUpdater>().Attack(NeoSatan.Health);

            // Spawn weakened version of neo-satan
            WeakenedNeoSatanRef = AIPlacementHelper.AddUnit(null, neoSatanPosition, WeakenedNeoSatan);
        }
Ejemplo n.º 9
0
 public void Spawn()
 {
     AIPlacementHelper.AddUnit(this.transform, new Point(this.xPosition, 0, this.yPosition), this.GetUnit(this.EnemyType));
 }
Ejemplo n.º 10
0
 private void SpawnIdleParticles()
 {
     this.particles?.ForEach(particle => AIPlacementHelper.RemoveEffect(particle));
     this.particles = new List <GameObject>();
     this.ValidPositions.ForEach(position => this.particles.Add(AIPlacementHelper.AddEffect(this.particlesIdlePrefab, this.gameObject.transform, position, this.particlesIdleHeight)));
 }
Ejemplo n.º 11
0
 private void PlaceMask()
 {
     mask = AIPlacementHelper.AddUnit(this.transform.parent, maskPosition, udeukedefrukeMaskPrefab);
     mask.GetComponent <UdeukedefrukeBodyBehaviour>().SetUp(this.Unit.Health);
 }