コード例 #1
0
            public override List <Shot> Fire(Vector2 location)
            {
                List <Shot> newTirs = new List <Shot>();
                CarotteShot carotte = new CarotteShot(RandomMachine.GetRandomVector2(TGPAContext.Instance.ScreenWidth, TGPAContext.Instance.ScreenWidth + 1, 0, TGPAContext.Instance.ScreenHeight), this, Math.PI, this.Flip);

                carotte.Location = carotte.Location + (new Vector2(carotte.DstRect.Width, 0));
                carotte.Speed   += new Vector2(150, 0);

                newTirs.Add(carotte);
                return(newTirs);
            }
コード例 #2
0
            public override List <Shot> Fire(Vector2 location)
            {
                List <Shot> newTirs = new List <Shot>();

                if (parent.AbleToShot)
                {
                    CarotteShot c = new CarotteShot(location, this, -1 * parent.Rotation + Math.PI, this.Flip);
                    c.DrawBehindEnemies = false;
                    newTirs.Add(c);

                    for (int i = 0; i < 3; i++)
                    {
                        TGPAContext.Instance.ParticleManager.AddParticle(new Smoke(location, RandomMachine.GetRandomVector2(-50f, 50f, -50f, 50f),
                                                                                   1f, 0.4f, 0f, 1f, RandomMachine.GetRandomFloat(1.5f, 4.5f), RandomMachine.GetRandomInt(0, 4)), parent.SmokeInBackground);
                    }
                }
                return(newTirs);
            }
コード例 #3
0
            public override List <Shot> Fire(Vector2 location)
            {
                List <Shot> newTirs = new List <Shot>();

                currentShot++;

                if (currentShot != randomHole)
                {
                    CarotteShot carotte = new CarotteShot(location, this, fireAngle, Flip);
                    newTirs.Add(carotte);
                }

                fireAngle += fireDirectionDelta;
                if ((fireAngle > 3 * Math.PI / 2) || (fireAngle < Math.PI / 2))
                {
                    this.cooldown = 15000f; //Stop firing
                }

                return(newTirs);
            }
コード例 #4
0
            public override List<Shot> Fire(Vector2 location)
            {
                List<Shot> newTirs = new List<Shot>();
                if (parent.AbleToShot)
                {
                    CarotteShot c = new CarotteShot(location, this, -1 * parent.Rotation + Math.PI, this.Flip);
                    c.DrawBehindEnemies = false;
                    newTirs.Add(c);

                    for (int i = 0; i < 3; i++)
                    {
                        TGPAContext.Instance.ParticleManager.AddParticle(new Smoke(location, RandomMachine.GetRandomVector2(-50f, 50f, -50f, 50f),
                1f, 0.4f, 0f, 1f, RandomMachine.GetRandomFloat(1.5f, 4.5f), RandomMachine.GetRandomInt(0, 4)), parent.SmokeInBackground);
                    }
                }
                return newTirs;
            }
コード例 #5
0
            public override List<Shot> Fire(Vector2 location)
            {
                List<Shot> newTirs = new List<Shot>();

                currentShot++;

                if (currentShot != randomHole)
                {
                    CarotteShot carotte = new CarotteShot(location, this, fireAngle, Flip);
                    newTirs.Add(carotte);
                }

                fireAngle += fireDirectionDelta;
                if ((fireAngle > 3 * Math.PI / 2) || (fireAngle < Math.PI / 2))
                {
                    this.cooldown = 15000f; //Stop firing
                }

                return newTirs;
            }
コード例 #6
0
            public override List<Shot> Fire(Vector2 location)
            {
                List<Shot> newTirs = new List<Shot>();
                CarotteShot carotte = new CarotteShot(RandomMachine.GetRandomVector2(TGPAContext.Instance.ScreenWidth, TGPAContext.Instance.ScreenWidth + 1, 0, TGPAContext.Instance.ScreenHeight), this, Math.PI, this.Flip);

                carotte.Location = carotte.Location + (new Vector2(carotte.DstRect.Width, 0));
                carotte.Speed += new Vector2(150, 0);

                newTirs.Add(carotte);
                return newTirs;
            }