Пример #1
0
        protected void HandleEngoopening(Vector2 startPoint, Vector2 direction)
        {
            float duration = 1f;
            DeadlyDeadlyGoopManager goopManagerForGoopType = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(SnareGoop.goopDefinition);

            goopManagerForGoopType.TimedAddGoopLine(startPoint, startPoint + direction * this.attackLength, this.barrageRadius, duration);
        }
Пример #2
0
            protected override IEnumerator Top()
            {
                DeadlyDeadlyGoopManager goopManagerForGoopType = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.FireDef);

                goopManagerForGoopType.TimedAddGoopLine(base.BulletBank.aiActor.CenterPosition, this.BulletManager.PlayerPosition(), 2, 0.25f);

                yield break;
            }
            // Token: 0x06000120 RID: 288 RVA: 0x0000AC74 File Offset: 0x00008E74
            private void Attack()
            {
                bool flag = this.Owner == null;

                if (flag)
                {
                    this.Owner = this.m_aiActor.GetComponent <BabyGoodShellicopter.ChopperBehavior>().Owner;
                }
                float num = -1f;

                List <AIActor> activeEnemies = this.Owner.CurrentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All);
                bool           flag2         = activeEnemies == null | activeEnemies.Count <= 0;

                if (!flag2)
                {
                    AIActor nearestEnemy = this.GetNearestEnemy(activeEnemies, this.m_aiActor.sprite.WorldCenter, out num, null);
                    bool    flag3        = nearestEnemy && num < 10f;
                    if (flag3)
                    {
                        bool flag4 = this.IsInRange(nearestEnemy);
                        if (flag4)
                        {
                            bool flag5 = !nearestEnemy.IsHarmlessEnemy && nearestEnemy.IsNormalEnemy && !nearestEnemy.healthHaver.IsDead && nearestEnemy != this.m_aiActor;
                            if (flag5)
                            {
                                if (UnityEngine.Random.value <= 0.1f)
                                {
                                    this.m_aiActor.StartCoroutine(this.sayVoiceLine());
                                }
                                float   x           = UnityEngine.Random.value;
                                Vector2 unitCenter  = this.m_aiActor.specRigidbody.UnitCenter;
                                Vector2 unitCenter2 = nearestEnemy.specRigidbody.HitboxPixelCollider.UnitCenter;
                                float   z           = BraveMathCollege.Atan2Degrees((unitCenter2 - unitCenter).normalized);
                                if (x <= 0.2f)
                                {
                                    this.m_aiActor.StartCoroutine(this.IgniteColumn1(z));
                                    this.m_aiActor.StartCoroutine(this.IgniteColumn2(z));
                                    DeadlyDeadlyGoopManager gooper = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(BabyGoodShellicopter.napalmGoop);
                                    gooper.TimedAddGoopLine(this.m_aiActor.sprite.WorldCenter, this.m_aiActor.sprite.WorldCenter + BraveMathCollege.DegreesToVector(z, 8), 0.8f, 2f);
                                }
                                else if (x <= 0.4f)
                                {
                                    this.m_aiActor.StartCoroutine(shootRockets(z));
                                }
                                else if (x <= 0.7f)
                                {
                                    this.m_aiActor.StartCoroutine(eightShots());
                                }
                                else
                                {
                                    this.m_aiActor.StartCoroutine(eightShots2(z));
                                }
                            }
                        }
                    }
                }
            }
Пример #4
0
 public override void OnReloadPressed(PlayerController player, Gun gun, bool manualReload)
 {
     if (gun.ClipShotsRemaining < gun.ClipCapacity)
     {
         DeadlyDeadlyGoopManager goopManagerForGoopType = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.FireDef);
         Vector2 vector     = gun.sprite.WorldCenter;
         Vector2 normalized = (player.unadjustedAimPoint.XY() - vector).normalized;
         goopManagerForGoopType.TimedAddGoopLine(gun.sprite.WorldCenter, gun.sprite.WorldCenter + normalized * 10, 1.5f, 0.5f);
     }
     base.OnReloadPressed(player, gun, manualReload);
 }
Пример #5
0
        //Add the item's functionality down here! I stole most of this from the Stuffed Star active item code!

        protected override void DoEffect(PlayerController user)
        {
            float length = 13;
            float width  = 2.5f;

            if (user.PlayerHasActiveSynergy("Ooh Eee Ooh Ah Ah!"))
            {
                length = 20;
                width  = 4;
            }
            DeadlyDeadlyGoopManager goopManagerForGoopType = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.CharmGoopDef);
            Vector2 vector     = user.CenterPosition;
            Vector2 normalized = (user.unadjustedAimPoint.XY() - vector).normalized;

            goopManagerForGoopType.TimedAddGoopLine(user.CenterPosition, user.CenterPosition + normalized * length, width, 0.5f);
            if (user.PlayerHasActiveSynergy("Number 9"))
            {
                goopManagerForGoopType.TimedAddGoopLine(user.CenterPosition, user.CenterPosition + (normalized * -1) * length, width, 0.5f);
            }
            //goopManagerForGoopType.gameObject.AddComponent<PurifiedWaterGoop>();
        }
Пример #6
0
            private IEnumerator DoBurst()
            {
                this.aiActor.MovementSpeed = 0;
                this.aiAnimator.PlayUntilFinished("burst", false, null, -1f, false);
                yield return(new WaitForSeconds(0.25f));

                if (this.aiActor.OverrideTarget)
                {
                    DeadlyDeadlyGoopManager goopManagerForGoopType = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.FireDef);
                    AkSoundEngine.PostEvent("Play_OBJ_glassbottle_shatter_01", this.gameObject);
                    Vector2 vector     = this.specRigidbody.UnitCenter;
                    Vector2 normalized = (this.aiActor.OverrideTarget.UnitCenter - vector).normalized;
                    goopManagerForGoopType.TimedAddGoopLine(this.specRigidbody.UnitCenter, this.specRigidbody.UnitCenter + normalized * 7, 1f, 0.5f);
                }
                yield return(new WaitForSeconds(0.25f));

                this.sprite.renderer.enabled = false;
                this.aiActor.EraseFromExistence();
                yield break;
            }