void Start () {
        gs = GameObject.Find("GameState").GetComponent<GameState>();
		gc = GameObject.Find("HandOfGod").GetComponent<GrabController>();
        tc = GameObject.Find("Tutorials").GetComponent<TutorialController>();
        ui = GameObject.Find("UI").GetComponent<UIManager>();
        sh = GameObject.Find("SoundHelper").GetComponent<SoundHelper>();
        planet = GameObject.Find("Planet");

        musicsource = gameObject.GetComponent<AudioSource>();
        StartCoroutine(startMusic());

        source = gameObject.AddComponent<AudioSource>();
        source.clip = crashSpaceship;
        source.loop = false;
        attackSource = gameObject.AddComponent<AudioSource>();
        attackSource.clip = attackSound;
        attackSource.loop = false;
        jetStartSource = gameObject.AddComponent<AudioSource>();
        jetStartSource.clip = jetstartSound;
        jetStartSource.loop = false;

        gs.ActiveSkill = 0;
        gs.CollectedResources = 0;
        bakeTimer = Time.time;
      
        // Create planet landscape
        planet.layer = 10;
        planet.GetComponent<RandomObjectScattering> ().Setup ();
        

        readyToBakePathfinding = true;
	}
Beispiel #2
0
		/// <summary>Is called when the plugin is loaded.</summary>
		/// <param name="properties">The properties supplied to the plugin on loading.</param>
		/// <returns>Whether the plugin was loaded successfully.</returns>
		public bool Load(LoadProperties properties) {
			Panel = new int[256];
			Sound = new SoundHelper(properties.PlaySound, 256);
			properties.Panel = Panel;
			properties.AISupport = AISupport.None;
			// TODO: Your old Load code goes here.
			return true;
		}
    void Start()
    {
        planet = GameObject.Find("Planet");
		
		sh = GameObject.Find("SoundHelper").GetComponent<SoundHelper>();
		
		musicsource = gameObject.GetComponent<AudioSource>();
		sh.Fade(musicsource, true, 0.5f);
    }
 void Awake()
 {
     // Register the singleton
     if (Instance != null)
     {
     Debug.LogError("Multiple instances of SoundHelper!");
     }
     Instance = this;
 }
Beispiel #5
0
 public void ProcessMachines()
 {
     if (_connectedChestsCache == null)
     {
         _connectedChestsCache = new Dictionary <string, Dictionary <Vector2, Chest> >();
         Parallel.ForEach(GetLocations(), BuildCacheForLocation);
     }
     if (MuteWhileCollectingFromMachines > 0)
     {
         SoundHelper.MuteTemporary(MuteWhileCollectingFromMachines);
     }
     foreach (var gameLocation in GetLocations())
     {
         MachineHelper.Who.currentLocation = gameLocation;
         lock (_connectedChestsCache)
         {
             if (!_connectedChestsCache.ContainsKey(LocationHelper.GetName(gameLocation)))
             {
                 // cache got invalidated
                 BuildCacheForLocation(gameLocation);
             }
         }
         foreach (var valuePair in _connectedChestsCache[LocationHelper.GetName(gameLocation)])
         {
             Vector2 location       = valuePair.Key;
             Chest   connectedChest = valuePair.Value;
             if (connectedChest == null)
             {
                 // no chest connected
                 continue;
             }
             if (!gameLocation.objects.ContainsKey(location))
             {
                 // skip connection without objects like floortiles etc
                 continue;
             }
             if (!_machineNamesToProcess.Contains(gameLocation.objects[location].Name))
             {
                 continue;
             }
             MachineHelper.ProcessMachine(gameLocation.objects[location], connectedChest, _materialHelper);
         }
     }
 }
Beispiel #6
0
        public MainForm(CopyDataTransport dataTransport)
        {
            instance = this;
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
            lang = Language.GetInstance();
            IniConfig.IniChanged += new FileSystemEventHandler(ReloadConfiguration);

            // Make sure all hotkeys pass this window!
            HotkeyControl.RegisterHotkeyHWND(this.Handle);
            RegisterHotkeys();

            tooltip = new ToolTip();

            UpdateUI();
            InitializeQuickSettingsMenu();

            captureForm = new CaptureForm();

            // Load all the plugins
            PluginHelper.instance.LoadPlugins(this, captureForm);
            SoundHelper.Initialize();

            // Enable the Greenshot icon to be visible, this prevents Problems with the context menu
            notifyIcon.Visible = true;

            // Create a new instance of the class: copyData = new CopyData();
            copyData = new CopyData();

            // Assign the handle:
            copyData.AssignHandle(this.Handle);
            // Create the channel to send on:
            copyData.Channels.Add("Greenshot");
            // Hook up received event:
            copyData.CopyDataReceived += new CopyDataReceivedEventHandler(CopyDataDataReceived);

            if (dataTransport != null)
            {
                HandleDataTransport(dataTransport);
            }
            ClipboardHelper.RegisterClipboardViewer(this.Handle);
        }
Beispiel #7
0
        public void HandleFiring(Player player, Vector2 mouseVector)
        {
            MyPlayer modPlayer = player.GetModPlayer <MyPlayer>();

            // minimum charge level is required to fire in the first place, but once you fire, you can keep firing.
            if (ShouldFireBeam(modPlayer))
            {
                // once fired, there's no going back.
                IsFired = true;

                // kill the charge sound if we're firing
                chargeSoundSlotId = SoundHelper.KillTrackedSound(chargeSoundSlotId);

                if (myProjectile == null)
                {
                    if (Main.netMode != NetmodeID.MultiplayerClient || Main.myPlayer == player.whoAmI)
                    {
                        // fire the laser!
                        myProjectile = Projectile.NewProjectileDirect(projectile.position + beamCreationOffset, projectile.velocity, mod.ProjectileType(beamProjectileName), GetBeamDamage(), projectile.knockBack, projectile.owner);
                    }
                }

                // increment the fire time, this handles "IsSustainingFire" as well as stating the beam is no longer firable (it is already being fired)
                CurrentFireTime++;

                // if the player has charge left, drain the ball
                if (ChargeLevel >= 0f)
                {
                    ChargeLevel = Math.Max(0f, ChargeLevel - FireDecayRate());

                    if (myProjectile != null) // TODO Temporary fix for two beams crossing
                    {
                        BaseBeam projectileAsBeam = myProjectile.modProjectile as BaseBeam;
                        projectileAsBeam.BeamIntensity = ChargeLevel;
                    }
                }

                // beam is no longer sustainable, and neither is the charge ball
                if (ChargeLevel <= 0f)
                {
                    KillBeam();
                }
            }
        }
Beispiel #8
0
        private void PlayerFireBullet()
        {
            if (Player.Status != StatusEnum.Alive)
            {
                return;
            }

            if (!PlayerBullet.Visible && CheckKeyDown(KeysEnum.KeyFire))
            {
                PlayerBullet.Xpos    = Player.Xpos;
                PlayerBullet.Ypos    = Player.Ypos + Player.Height;
                PlayerBullet.Width   = Constants.BulletWidth;
                PlayerBullet.Height  = Constants.BulletHeight;
                PlayerBullet.Dy      = Constants.PlayerBulletSpeed;
                PlayerBullet.Visible = true;

                SoundHelper.PlaySound(SoundsEnum.Shoot);
            }
        }
Beispiel #9
0
        public void stop()
        {
            // stop the connection lost sound from playing
            SoundHelper.stopContinuous();

            // set text to display
            if (!string.IsNullOrEmpty(endText))
            {
                view.setText(endText);
            }

            // reset all relevant variables in case task is restarted
            currentStimulus       = stimulusCounter = 0;
            currentRepetition     = 1;
            stimulusRemainingTime = -1;

            // log event app is stopped
            Data.logEvent(2, "AppStopped", CLASS_NAME);
        }
    void Awake()
    {
        //Check if instance already exists
        if (Singleton == null)
        {
            //if not, set instance to this
            Singleton = this;
        }

        //If instance already exists and it's not this:
        else if (Singleton != this)
        {
            //Then destroy this. This enforces our singleton pattern, meaning there can only ever be one instance of a GameManager.
            Destroy(gameObject);
        }

        //Sets this to not be destroyed when reloading scene
        DontDestroyOnLoad(gameObject);
    }
        public void ProcessKeyUp(System.Windows.Forms.KeyEventArgs args)
        {
            int kc = args.KeyValue;

            // Pak de knop. Bestaat ie niet? Laat maar.
            if (!buttons.ContainsKey(kc))
            {
                return;
            }
            PianoButton b = buttons[kc];

            // Light 'em.. down
            LightDown(b.octave, b.letter, b.black);
            b.pressed = false;

            // Stop the sound!
            SoundHelper.StopNote(new Note(Note.GetNoteLetterFromLetter(b.letter), b.octave, b.black, ComponentLength.FULL, 0));
            //SoundHelper.Cleanup();
        }
Beispiel #12
0
        private void DoRam(int number)
        {
            Projectile.NewProjectile(npc.Center, Vector2.Zero, mod.ProjectileType <ShipTeleportLinesProjectile>(), 0, 0);
            SoundHelper.PlayCustomSound("Sounds/ShipTeleport");

            if (number == 0)
            {
                npc.velocity.X = 24f;
            }
            else if (number == 1)
            {
                npc.velocity.X = -24f;
            }
            else
            {
                npc.velocity.Y = 24f;
            }

            IterationWarp++;
        }
Beispiel #13
0
        public override void Kill(int timeLeft)
        {
            SoundHelper.PlayVanillaSound(2, projectile.position, 122);
            int num251 = 1;

            if (projectile.owner == Main.myPlayer)
            {
                for (int num252 = 0; num252 < num251; num252++)
                {
                    Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
                    while (value15.X == 0f && value15.Y == 0f)
                    {
                        value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
                    }
                    value15.Normalize();
                    value15 *= (float)Main.rand.Next(70, 101) * 0.1f;
                    Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, mod.ProjectileType("HellzoneGrenadeProjectile2"), (int)((double)projectile.damage), 0f, projectile.owner, 0f, 0f);
                }
            }
        }
Beispiel #14
0
        private void BulletHitMother()
        {
            if (!PlayerBullet.Visible || Mother.Status != StatusEnum.Alive)
            {
                return;
            }

            if ((PlayerBullet.Xpos - (PlayerBullet.Width / 2) < Mother.Xpos + (Constants.MotherWidth / 2)) &&
                (PlayerBullet.Xpos + (PlayerBullet.Width / 2) > Mother.Xpos - (Constants.MotherWidth / 2)) &&
                (PlayerBullet.Ypos < Mother.Ypos + Constants.MotherHeight) &&
                (PlayerBullet.Ypos + PlayerBullet.Height > Mother.Ypos))
            {
                Mother.Hit();
                PlayerBullet.Visible = false;
                Score += Mother.Score;
                SoundHelper.PlaySound(SoundsEnum.Explosion);

                return;
            }
        }
Beispiel #15
0
        public Common()
        {
            MenuConfig = new MenuConfig();

            MessageCreator = new MessageCreator(this);
            SoundHelper    = new SoundHelper(this);

            AllyOverlay   = new AllyOverlay(this);
            EnemyOverlay  = new EnemyOverlay(this);
            NetworthPanel = new NetworthPanel(this);

            Verification = new Verification(this);

            SpiritBreakerCharge       = new SpiritBreakerCharge(this);
            MiranaArrow               = new MiranaArrow(this);
            InvokerEMP                = new InvokerEMP(this);
            InvokerSunStrike          = new InvokerSunStrike(this);
            KunkkaTorrent             = new KunkkaTorrent(this);
            LeshracSplitEarth         = new LeshracSplitEarth(this);
            LifeStealerInfest         = new LifeStealerInfest(this);
            LinaLightStrikeArray      = new LinaLightStrikeArray(this);
            PhantomAssassinBlur       = new PhantomAssassinBlur(this);
            PudgeHook                 = new PudgeHook(this);
            AncientApparitionIceBlast = new AncientApparitionIceBlast(this);
            BloodseekerRupture        = new BloodseekerRupture(this);
            WindrunnerPowershot       = new WindrunnerPowershot(this);

            //IllusionShow = new IllusionShow(this);
            LinkenShow  = new LinkenShow(this);
            Additional  = new Additional(this);
            TowerHelper = new TowerHelper(this);
            //VisibleByEnemy = new VisibleByEnemy(this);
            TrueSightVision = new TrueSightVision(this);
            Range           = new Range(this);

            ParticleMonitor = new ParticleMonitor(this);
            UnitMonitor     = new UnitMonitor(this);
            ModifierMonitor = new ModifierMonitor(this);
        }
Beispiel #16
0
    public void moveTowardsTarget(HexaPos _targetPos)
    {
        for (int i = 0; i < walkRange; i++)
        {
            int dist = Map.distance(pos, _targetPos);

            if (dist <= 0)
            {
                break;
            }

            int     dir        = Map.getDirection(pos, _targetPos);
            HexaPos moveTarget = Map.tilesInRange(pos, 1)[dir];
            SceneHandler.setMeeplePos(this.gameObject, moveTarget);
            Debug.Log(meepleName + "moved!!!to" + moveTarget + "DIRECTION:");
        }

        GameObject  tileHolder = GameObject.Find("tileHolder");
        SoundHelper sh         = tileHolder.GetComponent <SoundHelper>();

        sh.Play("run");
    }
        public override void AI()
        {
            if (!player.channel || (chargeLevel >= chargeLimit))
            {
                if (chargeLevel >= 1)
                {
                    float rot = (float)Math.Atan2((Main.mouseY + Main.screenPosition.Y) - projectile.Center.Y, (Main.mouseX + Main.screenPosition.X) - projectile.Center.X);
                    Projectile.NewProjectileDirect(new Vector2(projectile.Center.X, projectile.Center.Y), new Vector2((float)((Math.Cos(rot) * 15)), (float)((Math.Sin(rot) * 15))), mod.ProjectileType("BigBangKamehamehaBlast"), projectile.damage + (chargeLevel * 65), projectile.knockBack, projectile.owner);

                    //ChargeLevel = 0;
                    SoundHelper.PlayCustomSound("Sounds/BasicBeamFire", projectile.Center);

                    projectile.Kill();

                    for (int i = 0; i < 100; i++)
                    {
                        float   angle    = Main.rand.NextFloat(360);
                        float   angleRad = MathHelper.ToRadians(angle);
                        Vector2 position = new Vector2((float)Math.Cos(angleRad), (float)Math.Sin(angleRad));
                        Dust    tDust    = Dust.NewDustDirect(projectile.position + (position * (20 + 3.0f * projectile.scale)), projectile.width, projectile.height, dustType, 0f, 0f, 213, default(Color), 3.0f);
                        tDust.velocity  = -0.5f * Vector2.Normalize((projectile.position + (projectile.Size / 2)) - tDust.position) * 2;
                        tDust.noGravity = true;
                    }
                }
                _chargeSoundSlotId = SoundHelper.KillTrackedSound(_chargeSoundSlotId);
            }

            if (!startingCharge)
            {
                startingCharge = true;
                if (!Main.dedServ)
                {
                    _chargeSoundSlotId = SoundHelper.PlayCustomSound("Sounds/EnergyWaveCharge", projectile.Center);
                }
            }

            SoundHelper.UpdateTrackedSound(_chargeSoundSlotId, projectile.Center);
        }
        public void ProcessMachines()
        {
            if (_connectedChestsCache == null)
            {
                _connectedChestsCache = new Dictionary <string, Dictionary <Vector2, Chest> >();
                Parallel.ForEach(GetLocations(), BuildCacheForLocation);
            }

            if (MuteWhileCollectingFromMachines > 0)
            {
                SoundHelper.MuteTemporary(MuteWhileCollectingFromMachines);
            }

            foreach (var gameLocation in GetLocations())
            {
                MachineHelper.Who.currentLocation = gameLocation;
                MachineHelper.Monitor             = _monitor;
                lock (_connectedChestsCache)
                {
                    if (!_connectedChestsCache.ContainsKey(LocationHelper.GetName(gameLocation)))
                    {
                        // cache got invalidated
                        BuildCacheForLocation(gameLocation);
                    }
                }

                foreach (var valuePair in _connectedChestsCache[LocationHelper.GetName(gameLocation)])
                {
                    var location       = valuePair.Key;
                    var connectedChest = valuePair.Value;
                    if (connectedChest != null && gameLocation.objects.ContainsKey(location) &&
                        _machineConfigs.Any(x => x.Name == gameLocation.objects[location].Name))
                    {
                        MachineHelper.ProcessMachine(gameLocation.objects[location], connectedChest, _materialHelper, (from x in _machineConfigs where x.Name == gameLocation.objects[location].Name select x).FirstOrDefault());
                    }
                }
            }
        }
Beispiel #19
0
 public void DBSummonEffects()
 {
     if (NPC.CountNPCS(ModContent.NPCType <ShenronNPC>()) == 0)
     {
         int dust = Dust.NewDust(player.Center, player.width, player.height / 3, 133, 0, -25f);
         dust = Dust.NewDust(player.Center, player.width, player.height / 3, 133, 0, -25f);
         Main.dust[dust].noGravity = true;
         if (DBTMod.IsTickRateElapsed(80))
         {
             Main.dust[dust].velocity.Y = -25f;
             Main.dust[dust].scale      = 1f;
         }
         if (DBTMod.IsTickRateElapsed(160))
         {
             Main.dust[dust].velocity.X = Main.rand.Next(-30, 30);
             Main.dust[dust].velocity.Y = 0;
             Main.dust[dust].scale      = 1f;
         }
         if (DBTMod.IsTickRateElapsed(80))
         {
             Projectile.NewProjectile(player.Center + new Vector2(Main.rand.Next(-700, 700), -50), Vector2.Zero, ModContent.ProjectileType <YellowLightning>(), 0, 0);
             SoundHelper.PlayCustomSound("Sounds/Lightning", player, 0.5f);
         }
         if (DBTMod.IsTickRateElapsed(500))
         {
             Main.time = 72000;
             NPC.NewNPC((int)player.position.X, (int)player.position.Y, ModContent.NPCType <ShenronNPC>());
             NetMessage.SendData(MessageID.SyncNPC);
         }
     }
     else
     {
         if (DBTMod.IsTickRateElapsed(500))
         {
             WishMenu.menuVisible = true;
         }
     }
 }
Beispiel #20
0
        private void PlayerBackgroundSound(int counter, int timer)
        {
            if (GameStatus == GameEnum.Dead || GameStatus == GameEnum.Next || GameStatus == GameEnum.Pause)
            {
                return;
            }

            var bgSoundSpeed = (timer + 1) * 4;

            if (counter % bgSoundSpeed != 0)
            {
                return;
            }

            var soundCount = (counter / bgSoundSpeed) % 4;

            switch (soundCount)
            {
            case 0:
                SoundHelper.PlaySound(SoundsEnum.Inv1);
                break;

            case 1:
                SoundHelper.PlaySound(SoundsEnum.Inv2);
                break;

            case 2:
                SoundHelper.PlaySound(SoundsEnum.Inv3);
                break;

            case 3:
                SoundHelper.PlaySound(SoundsEnum.Inv4);
                break;

            default:
                break;
            }
        }
Beispiel #21
0
        private void DoSlamPerWarp()
        {
            npc.noTileCollide = true;

            float velocity = 25f;

            Player player = PlayerCount()[warpCount];

            if (warpCountPlayer == 0)
            {
                npc.velocity.X  = velocity;
                player.velocity = new Vector2(velocity * 3, -velocity / 2);
            }
            else if (warpCountPlayer == 1)
            {
                npc.velocity.X  = -velocity;
                player.velocity = new Vector2(velocity * -3, -velocity / 2);
            }
            else if (warpCountPlayer == 2)
            {
                npc.velocity.Y  = velocity;
                player.velocity = new Vector2(0f, velocity * 10);
                warpCountPlayer = 0;
                npc.velocity    = Vector2.Zero;
                ExplodeEffect(player.Center);
                warpCount++;
            }

            player.Hurt(
                PlayerDeathReason.ByCustomReason(
                    player.name + "has been flattened by the Frieza Force Ship"), 70, 1);
            ExplodeEffect(new Vector2(npc.Center.X, npc.Center.Y));
            SoundHelper.PlayCustomSound("Sounds/KiExplosion", npc.Center);
            npc.netUpdate = true;

            warpCountPlayer++;
        }
Beispiel #22
0
 public void DoOverloadOrb()
 {
     Projectile.NewProjectile(player.position.X, player.position.Y, 0, 0, mod.ProjectileType <AuraOrb>(), 0, 0, player.whoAmI);
     SoundHelper.PlayCustomSound("Sounds/Overload/Overloadburst", player, 0.3f);
 }
Beispiel #23
0
 private void DoShaderEffects()
 {
     Projectile.NewProjectile(player.position.X, player.position.Y, 0, 0, mod.ProjectileType <ShaderOrb1>(), 0, 0, player.whoAmI);
     SoundHelper.PlayCustomSound("Sounds/Overload/Overloadcircle", player, 0.3f);
 }
Beispiel #24
0
 private void button5_Click(object sender, EventArgs e)
 {
     SoundHelper.PlaySound(5, 1000, 50);
 }
Beispiel #25
0
        //To-Do: Add the rest of the stages to the AI. Make green saibaman code.
        //Make the speed of the ship's movements increase with less health, increase the speed of the projectiles, increase how fast the ship goes down on the dash, finish dash afterimage, make the homing projectiles move faster if the player is flying.
        //Boss loot: Drops Undecided material that's used to create a guardian class armor set (frieza cyborg set). Alternates drops between a weapon and accessory, accessory is arm cannon mk2, weapon is a frieza force beam rifle. Expert item is the mechanical amplifier.
        //Spawn condition: Near the ocean you can find a frieza henchmen, if he runs away then you'll get an indicator saying the ship will be coming the next morning.


        public override void AI()
        {
            Player player = Main.player[npc.target];

            npc.TargetClosest(true);

            //Runaway if no players are alive
            if (!player.active || player.dead)
            {
                npc.TargetClosest(false);
                player = Main.player[npc.target];
                if (!player.active || player.dead)
                {
                    npc.velocity = new Vector2(0f, -10f);
                    if (npc.timeLeft > 10)
                    {
                        npc.timeLeft = 10;
                    }
                    return;
                }
            }

            //Make sure the stages loop back around
            if (AIStage == 5)
            {
                AIStage = Stage_Hover;
            }

            //Speed between stages and general movement speed drastically increased with health lost
            if (npc.life < npc.lifeMax * 0.80f)
            {
                hoverCooldown = 400;
                speedAdd      = 1f;
                if (npc.life < npc.lifeMax * 0.50f)
                {
                    hoverCooldown = 250;
                    speedAdd      = 2f;
                }
                if (npc.life < npc.lifeMax * 0.2f)
                {
                    hoverCooldown = 100;
                    speedAdd      = 4f;
                }
            }
            //If the ship is really far away, nullify its movement and set it back to hover
            if (Vector2.Distance(new Vector2(0, player.position.Y), new Vector2(0, npc.position.Y)) > hoverDistance.Y * 3)
            {
                npc.velocity = new Vector2(0, -10f);
            }


            //General movement (stage 0)
            if (AIStage == Stage_Hover)
            {
                //Y Hovering
                if (Vector2.Distance(new Vector2(0, player.position.Y), new Vector2(0, npc.position.Y)) != hoverDistance.Y)
                {
                    if (Vector2.Distance(new Vector2(0, player.position.Y), new Vector2(0, npc.position.Y)) > hoverDistance.Y)
                    {
                        //float hoverSpeedY = (2f + Main.rand.NextFloat(3, 8));
                        //Add a little bit of delay before moving, this lets melee players possibly get a hit in
                        YHoverTimer++;
                        if (YHoverTimer > 15)
                        {
                            npc.velocity.Y = 2f;
                        }
                    }
                    else if (Vector2.Distance(new Vector2(0, player.position.Y), new Vector2(0, npc.position.Y)) < hoverDistance.Y)
                    {
                        //float hoverSpeedY = (-2f + Main.rand.NextFloat(-3, -8));
                        YHoverTimer++;
                        if (YHoverTimer > 15)
                        {
                            npc.velocity.Y = -2f;
                        }
                    }
                }
                else
                {
                    npc.velocity.Y = 0;
                    YHoverTimer    = 0;
                }
                //X Hovering, To-Do: Make the ship not just center itself on the player, have some left and right alternating movement?
                if (Vector2.Distance(new Vector2(0, player.position.X), new Vector2(0, npc.position.X)) != hoverDistance.X)
                {
                    //float hoverSpeedY = (-2f + Main.rand.NextFloat(-3, -8));
                    XHoverTimer++;
                    if (XHoverTimer > 30)
                    {
                        npc.velocity.X = (2.5f * npc.direction) + (speedAdd * npc.direction);
                        if (AITimer > hoverCooldown / 1.2)
                        {
                            npc.velocity.X = (7f * npc.direction) + (speedAdd * 2 * npc.direction);
                        }
                    }
                }
                else
                {
                    npc.velocity.X = 0;
                    XHoverTimer    = 0;
                }

                //Next Stage
                AITimer++;
                if (AITimer > hoverCooldown)
                {
                    StageAdvance();
                    AITimer = 0;
                }
            }


            //Main.NewText("Speed Addition is: " + speedAdd);



            //Slam attack (stage 1) - Quickly moves to directly above the player, then waits a second before slamming straight down.
            //To-Do: Make slam do increased contact damage. Fix bug where the ship flies down into the ground. Fix afterimage on slam not working.

            if (AIStage == Stage_Slam)
            {
                npc.velocity.X = 0;

                locationSelected = true;
                AITimer++;
                if (AITimer > 10)
                {
                    if (AITimer == 11)
                    {
                        npc.noTileCollide = false;
                        if (npc.life <= npc.lifeMax * 0.50)//Double the contact damage if below 50% health
                        {
                            npc.damage = npc.damage * 2;
                        }
                        npc.velocity.Y = 25f;
                    }
                    if (CoordinateExtensions.IsPositionInTile(npc.getRect().Bottom()) || AITimer > 20)//If the bottom of the ship touches a tile, nullify speed and do dust particles
                    {
                        npc.velocity.Y = -8f;
                        if (!hasDoneExplodeEffect)
                        {
                            ExplodeEffect();
                            SoundHelper.PlayCustomSound("Sounds/Kiplosion", npc.position, 1.0f);
                        }
                    }

                    if (npc.velocity.Y == -8f)
                    {
                        slamCoolDownTimer++;
                    }
                    if (slamCoolDownTimer > 20)
                    {
                        StageAdvance();
                        AITimer              = 0;
                        slamCoolDownTimer    = 0;
                        locationSelected     = false;
                        npc.noTileCollide    = true;
                        hasDoneExplodeEffect = false;
                        if (npc.life <= npc.lifeMax * 0.50)//Reset the damage back to its normal amount
                        {
                            npc.damage = npc.damage / 2;
                        }
                    }
                }
            }
            //float ydistance = Vector2.Distance(new Vector2(0, player.position.Y), new Vector2(0, npc.position.Y));
            //Main.NewText("Y Distance is: " + ydistance);
            //Vertical projectile barrage (stage 2) - Fires a barrage of projectiles upwards that randomly spread out and fall downwards which explode on ground contact

            if (AIStage == Stage_Barrage)
            {
                AITimer++;
                npc.velocity.Y = 0;
                npc.velocity.X = 0;

                if (AITimer == 10)
                {
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);


                    if (npc.life < npc.lifeMax * 0.50f) //Fire 16 extra projectiles if below 50% health
                    {
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -6f, mod.ProjectileType("FFBarrageBlast"), npc.damage / 4, 3f, Main.myPlayer);
                    }
                }

                if (AITimer > 60)
                {
                    if (npc.life < npc.lifeMax * 0.70f)
                    {
                        StageAdvance();
                    }
                    else
                    {
                        AIStage = Stage_Hover;
                    }
                    AITimer = 0;
                }
            }

            //Vertical projectile barrage + homing (stage 3) - Fires 2 projectiles in opposite arcs diagonally from the ship, after 3 seconds they stop, after 1 second both will fly towards the player.
            // These projectiles are stronger than the barrage ones, but also slower.

            if (AIStage == Stage_Homing)
            {
                npc.velocity.Y = 0;
                npc.velocity.X = 0;

                if (AITimer == 0)
                {
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 2.5f, -1f, mod.ProjectileType("FFHomingBlast"), npc.damage / 3, 3f, Main.myPlayer);
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -2.5f, -1f, mod.ProjectileType("FFHomingBlast"), npc.damage / 3, 3f, Main.myPlayer);

                    if (npc.life < npc.lifeMax * 0.50f) //Fire an extra stronger projectile upwards if below 50% health
                    {
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -1f, mod.ProjectileType("FFHomingBlast"), npc.damage / 2, 3f, Main.myPlayer);
                    }
                }
                AITimer++;
                if (AITimer > 60)
                {
                    if (npc.life < npc.lifeMax * 0.40f)
                    {
                        StageAdvance();
                    }
                    else
                    {
                        AIStage = Stage_Hover;
                    }
                    AITimer = 0;
                }
            }

            //To-Do: Summon saibamen (stage 4) - Summons a green saiba from the ship, green dust when this happens to make it look smoother (Perhaps make this something after 40% HP)
            if (Main.netMode != 1 && AIStage == Stage_Saiba)
            {
                if (AITimer == 0)
                {
                    int saiba = NPC.NewNPC((int)npc.position.X, (int)npc.position.Y, mod.NPCType("SaibaGreen"));
                    Main.npc[saiba].netUpdate = true;
                    npc.netUpdate             = true;
                }
                AITimer++;
                if (AITimer > 60)
                {
                    StageAdvance();
                    AITimer = 0;
                }
            }

            //Main.NewText(AIStage);
        }
Beispiel #26
0
 private void btnPreview_Click(object sender, EventArgs e)
 {
     SoundHelper.PlayWav(txtSound.Text);
 }
Beispiel #27
0
 public void EffectsChange(float value)
 {
     Mixer.SetFloat("effects", SoundHelper.PercentToDecible(value));
     StorageeHelper.EffectsVolume.Value = value;
 }
Beispiel #28
0
 public void MusicChange(float value)
 {
     Mixer.SetFloat("music", SoundHelper.PercentToDecible(value));
     StorageeHelper.MusicVolume.Value = value;
 }
Beispiel #29
0
 public void InitializeVanishState()
 {
     isInitialized = true;
     SoundHelper.PlayCustomSound("Sounds/Transmission", projectile.Center, .7f, .2f);
 }
Beispiel #30
0
    void OnMouseDown()
    {
        if (isActive)
        {
            Map.highlightAllInnerTiles(false);

            if (meep == null && SceneHandler.meeples.Contains(SceneHandler.activeCompanion))
            {
                SceneHandler.setMeeplePos(SceneHandler.activeCompanion.gameObject, new HexaPos(posX, posY));

                GameObject  tileHolder = GameObject.Find("tileHolder");
                SoundHelper sh         = tileHolder.GetComponent <SoundHelper>();
                sh.Play("run");
            }
            else if (meep == null && SceneHandler.activeMode == GameMode.PREPARATION)
            {
                Type compType = SceneHandler.activeCompanion.GetType();

                switch (compType.ToString())
                {
                case "Mercenary":
                    SceneHandler.createMeeple <Mercenary>("Mercenary", new HexaPos(posX, posY));
                    break;

                case "Hunter":
                    SceneHandler.createMeeple <Hunter>("Mercenary", new HexaPos(posX, posY));
                    break;

                case "HuntedAnimal":
                    SceneHandler.createMeeple <HuntedAnimal>("Mercenary", new HexaPos(posX, posY));
                    break;

                case "Healer":
                    SceneHandler.createMeeple <Healer>("Mercenary", new HexaPos(posX, posY));
                    break;

                case "Scout":
                    SceneHandler.createMeeple <Scout>("Mercenary", new HexaPos(posX, posY));
                    break;

                case "PackAnimal":
                    SceneHandler.createMeeple <PackAnimal>("Mercenary", new HexaPos(posX, posY));
                    break;

                default:
                    break;
                }
            }
            else if (meep.GetType() == typeof(Opponent) && SceneHandler.activeTacticalGame.GetType() == typeof(BattleGround))
            {
                Mercenary merc = (Mercenary)SceneHandler.activeCompanion;

                int dist = Map.distance(meep.Pos, merc.Pos);
                int rnd  = SceneHandler.rollDice(10);
                Debug.Log(rnd + " " + dist);
                if (rnd >= dist)
                {
                    merc.fight(meep.GetComponent <Opponent>());
                }
                merc.HasActionOutstanding = false;
            }
            else if (meep.GetType() == typeof(HuntedAnimal) && SceneHandler.activeTacticalGame.GetType() == typeof(HuntingGround))
            {
                Debug.Log("HUNT");
                Hunter hunter = (Hunter)SceneHandler.activeCompanion;
                SceneHandler.gainProviant(hunter.hunt(meep.GetComponent <HuntedAnimal>()));
            }

            SceneHandler.activeCompanion = null;
        }
    }
Beispiel #31
0
        //private bool _isInitialized = false;
        public override void AI()
        {
            Player    player    = Main.player[projectile.owner];
            ModPlayer modPlayer = player.GetModPlayer <ModPlayer>();

            /*if (!_isInitialized)
             * {
             *  modPlayer.isMassiveBlastCharging = true;
             *  //modPlayer.isMassiveBlastInUse = true;
             *  HeldTime = 1;
             *  _isInitialized = true;
             * }*/

            // cancel channeling if the projectile is maxed
            if (player.channel && projectile.scale > 2.5)
            {
                player.channel = false;
            }

            if (player.channel)
            {
                projectile.scale = BASE_SCALE + SCALE_INCREASE * HeldTime;
                Vector2 projectileOffset = new Vector2(-projectile.width * 0.5f, -projectile.height * 0.5f);
                projectileOffset   += new Vector2(0, -(80 + projectile.scale * 115f));
                projectile.position = player.Center + projectileOffset;
                HeldTime++;

                //Rock effect
                projectile.ai[1]++;
                if (projectile.ai[1] % 7 == 0)
                {
                    Projectile.NewProjectile(projectile.Center.X + Main.rand.NextFloat(-500, 600), projectile.Center.Y + 1000, 0, -10, mod.ProjectileType("StoneBlockDestruction"), projectile.damage, 0f, projectile.owner);
                }
                Projectile.NewProjectile(projectile.Center.X + Main.rand.NextFloat(-500, 600), projectile.Center.Y + 1000, 0, -10, mod.ProjectileType("DirtBlockDestruction"), projectile.damage, 0f, projectile.owner);

                if (projectile.timeLeft < 399)
                {
                    projectile.timeLeft = 400;
                }

                MyPlayer.ModPlayer(player).AddKi(-2, true, false);
                player.ApplyChannelingSlowdown();

                // depleted check, release the ball
                if (MyPlayer.ModPlayer(player).IsKiDepleted())
                {
                    player.channel = false;
                }
                if (_soundtimer == 0)
                {
                    _soundInfo = SoundHelper.PlayCustomSound("Sounds/SuperNovaCharge", player, 0.6f);
                }
                _soundtimer++;
                if (_soundtimer > 120)
                {
                    _soundtimer = 0;
                }
            }
            else if (modPlayer.isMassiveBlastCharging)
            {
                modPlayer.isMassiveBlastCharging = false;
                float projectileWidthFactor = projectile.width * projectile.scale / TRAVEL_SPEED_COEFFICIENT;
                projectile.timeLeft    = (int)Math.Ceiling(projectileWidthFactor) + 180;
                projectile.velocity    = Vector2.Normalize(Main.MouseWorld - player.Center) * TRAVEL_SPEED_COEFFICIENT;
                projectile.tileCollide = false;
                projectile.damage     *= (int)Math.Ceiling(projectile.scale / 3f);
                _soundInfo             = SoundHelper.KillTrackedSound(_soundInfo);
                SoundHelper.PlayCustomSound("Sounds/SuperNovaThrow", player, 0.6f);
            }
            projectile.netUpdate  = true;
            projectile.netUpdate2 = true;
        }
Beispiel #32
0
        public override void AI()
        {
            //Main.NewText("Alpha is: " + npc.alpha);
            Player    player    = Main.player[npc.target];
            DBTPlayer dbtPlayer = player.GetModPlayer <DBTPlayer>();

            npc.ai[0]++;
            npc.ai[1]++;
            if (!dbtPlayer.WishActive && fadingAway)
            {
                if (npc.alpha < 255)
                {
                    npc.alpha += 3;
                    if (npc.alpha == 254)
                    {
                        npc.active = false;
                    }
                }
            }
            if (dbtPlayer.WishActive && npc.alpha > 0)
            {
                npc.alpha -= 2;
            }

            if (dbtPlayer.WishActive && npc.alpha <= 0)
            {
                if (npc.ai[1] > 20 && !questionAsked)
                {
                    SoundHelper.PlayCustomSound("Sounds/Shenron/Wishquestion" + Main.rand.Next(1, 3), npc.Center, 0.8f);
                    questionAsked = true;
                    npc.ai[1]     = 0;
                }
                if (npc.ai[1] > 600 + Main.rand.Next(200) && questionAsked)
                {
                    SoundHelper.PlayCustomSound("Sounds/Shenron/Wishwaiting" + Main.rand.Next(1, 3), npc.Center, 0.8f);
                    npc.ai[1] = 0;
                }
            }
            if (!dbtPlayer.WishActive && !fadingAway)
            {
                aiTimer++;
                if (aiTimer == 30)
                {
                    SoundHelper.PlayCustomSound("Sounds/WishGranted", npc.Center, 0.5f);
                }

                if (aiTimer == 180)
                {
                    SoundHelper.PlayCustomSound("Sounds/Shenron/Wishgranted" + Main.rand.Next(1, 3), npc.Center, 0.8f);
                }
                if (aiTimer == 420)
                {
                    fadingAway = true;
                }
            }
            npc.TargetClosest(true);
            if (npc.velocity.Y == 0 || (npc.velocity.Y == 0.2f && npc.ai[0] == 100))
            {
                npc.velocity.Y -= 0.2f;
                npc.ai[0]       = 0;
            }
            if (npc.velocity.Y == -0.2f && npc.ai[0] == 100)
            {
                npc.velocity.Y = 0.2f;
                npc.ai[0]      = 0;
            }
            Lighting.AddLight(npc.Center - new Vector2(0, 100), new Vector3(10f - npc.alpha / 60, 10f - npc.alpha / 60, 2f - npc.alpha / 60));
        }
Beispiel #33
0
        public override void Kill(int timeLeft)
        {
            if (!projectile.active)
            {
                return;
            }
            projectile.tileCollide = false;
            projectile.ai[1]       = 0f;
            projectile.alpha       = 255;

            projectile.position.X = projectile.position.X + (float)(projectile.width / 2);
            projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2);
            projectile.width      = 22;
            projectile.height     = 22;
            projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
            projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
            projectile.knockBack  = 8f;
            projectile.Damage();

            Main.projectileIdentity[projectile.owner, projectile.identity] = -1;
            int num = projectile.timeLeft;

            projectile.timeLeft = 0;

            SoundHelper.PlayCustomSound("Sounds/Explosion", projectile.Center, .3f);

            projectile.position.X = projectile.position.X + (float)(projectile.width / 2);
            projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2);
            projectile.width      = 22;
            projectile.height     = 22;
            projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
            projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
            for (int num615 = 0; num615 < 30; num615++)
            {
                int num616 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, default(Color), 1.5f);
                Main.dust[num616].velocity *= 1.4f;
            }
            for (int num617 = 0; num617 < 20; num617++)
            {
                int num618 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 3.5f);
                Main.dust[num618].noGravity = true;
                Main.dust[num618].velocity *= 7f;
                num618 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 1.5f);
                Main.dust[num618].velocity *= 3f;
            }
            for (int num619 = 0; num619 < 2; num619++)
            {
                float scaleFactor9 = 3f;
                if (num619 == 1)
                {
                    scaleFactor9 = 3f;
                }
                int num620 = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[num620].velocity *= scaleFactor9;
                Gore gore97 = Main.gore[num620];
                gore97.velocity.X = gore97.velocity.X + 1f;
                Gore gore98 = Main.gore[num620];
                gore98.velocity.Y           = gore98.velocity.Y + 1f;
                num620                      = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[num620].velocity *= scaleFactor9;
                Gore gore99 = Main.gore[num620];
                gore99.velocity.X = gore99.velocity.X - 1f;
                Gore gore100 = Main.gore[num620];
                gore100.velocity.Y          = gore100.velocity.Y + 1f;
                num620                      = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[num620].velocity *= scaleFactor9;
                Gore gore101 = Main.gore[num620];
                gore101.velocity.X = gore101.velocity.X + 1f;
                Gore gore102 = Main.gore[num620];
                gore102.velocity.Y          = gore102.velocity.Y - 1f;
                num620                      = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[num620].velocity *= scaleFactor9;
                Gore gore103 = Main.gore[num620];
                gore103.velocity.X = gore103.velocity.X - 1f;
                Gore gore104 = Main.gore[num620];
                gore104.velocity.Y = gore104.velocity.Y - 1f;
            }
            projectile.active = false;
        }
Beispiel #34
0
 public override void Kill(int timeLeft)
 {
     Projectile.NewProjectile(projectile.position.X, projectile.position.Y, 0, 0, mod.ProjectileType <ShaderOrb3>(), 0, 0, projectile.owner);
     SoundHelper.PlayCustomSound("Sounds/Overload/Overloadcircle", Main.player[projectile.owner], 0.3f);
 }