コード例 #1
0
ファイル: Legion.cs プロジェクト: Kcanavrin/tesseract
        public Legion(Vector2 position)
            : base(position)
        {
            Tesseract.Engine.GameWorld.GameState.InstantiateCurrent(new StoryElement(LevelManager.world.Reward));
            body = new TriangleBody(0, null);
            Position = position;
            speed = 1f;
            health = 5;
            spawnTime = 0;
            this.Invulnerable = true;
            fire = ContentManager.Load<SoundEffect>("Sound/BigShot04");

            Halderon = new SphereCollider();

            this.OnHit += (o, e) =>
            {
                if (!this.Invulnerable)
                {
                    for(int i = 0; i < 8; ++i)
                    {
                        Vector2 circle = new Vector2((float)Math.Sin(i / 8f * 6.28f), (float)Math.Cos(i / 8f * 6.28f)) / 5f;
                        Tesseract.Engine.GameWorld.GameState.InstantiateCurrent(new EnemyMelee(this.Position + circle, (int)TesseractWorldManager.MeleeSubtype.Chaser));
                    }
                }

            };
            radius = .6f;
        }
コード例 #2
0
ファイル: VampireBullet.cs プロジェクト: Kcanavrin/tesseract
 public VampireBullet(Vector2 Position, float speed, Blutsauger Parent)
 {
     this.Position = Position;
     this.speed = speed;
     this.touch = new SphereCollider();
     this.touch.Radius = this.radius;
     this.parent = Parent;
 }
コード例 #3
0
ファイル: Enemy.cs プロジェクト: Kcanavrin/tesseract
 public Enemy(Vector2 pos)
 {
     Position = pos;
     texture = ContentManager.Load<Texture2D>("Player.png");
     speed = 0.75f;
     Health = 5;
     Collider = new SphereCollider();
     Collider.Radius = 0.1f;
 }
コード例 #4
0
ファイル: Enemy.cs プロジェクト: Kcanavrin/tesseract
 public Enemy(Vector2 pos)
 {
     Position = pos;
     texture = ContentManager.Load<Texture2D>("Player.png");
     speed = 0.75f;
     if (Health == 0)
         Health = 5;
     Collider = new SphereCollider();
     Collider.Radius = 0.1f;
     radius = Collider.Radius;
     Invulnerable = false;
 }
コード例 #5
0
ファイル: Blutsauger.cs プロジェクト: Kcanavrin/tesseract
 public Blutsauger(Vector2 pos)
 {
     fire = ContentManager.Load<SoundEffect>("Sound/BigShot04");
     Position = pos;
     speed = 1f;
     health = 10;
     Halderon = new SphereCollider();
     Halderon.Radius = .4f;
     radius = Halderon.Radius;
     shootyTime = 0;
     cooldown = 0;
     this.OnHit += (o, e) =>
     {
         cooldown = .25f;
         this.Invulnerable = true;
     };
 }
コード例 #6
0
ファイル: Blutsauger.cs プロジェクト: Kcanavrin/tesseract
 public Blutsauger(Vector2 pos)
 {
     Tesseract.Engine.GameWorld.GameState.InstantiateCurrent(new StoryElement(LevelManager.world.Reward));
     fire = ContentManager.Load<SoundEffect>("Sound/BigShot04");
     Position = pos;
     speed = 1f;
     health = 10;
     Halderon = new SphereCollider();
     Halderon.Radius = .4f;
     radius = Halderon.Radius;
     shootyTime = 0;
     cooldown = 0;
     this.OnHit += (o, e) =>
     {
         cooldown = .25f;
         this.Invulnerable = true;
     };
 }
コード例 #7
0
ファイル: Player.cs プロジェクト: Kcanavrin/tesseract
        public Player()
        {
            texture = ContentManager.Load<Texture2D>("Player.png"); //unused
            scoreFont=ContentManager.Load<SpriteFont>("ScoreFont");
            //hit = ContentManager.Load<SoundEffect>("Audio/player_hit.mp3");
            //upgradeLife = ContentManager.Load<SoundEffect>("Audio/player_upgrade_life.mp3");
            //upgradeWeaponDamage = ContentManager.Load<SoundEffect>("Audio/player_upgrade_weapon_damage.mp3");
            //upgradeWeaponSpeed = ContentManager.Load<SoundEffect>("Audio/player_upgrade_weapon_speed.mp3");
            //upgradeWeaponSpread = ContentManager.Load<SoundEffect>("Audio/player_upgrade_weapon_spread.mp3");
            fire = ContentManager.Load<SoundEffect>("Sound/Shot07");
            Position = new Vector2(-0.75f,0);
            Tesseract.Engine.HighscoreHandler.score = 0;
            speed = 1.0f;//player speed
            Health = 3;
            weapon = new Weapons.BasicWeapon();

            Collider = new SphereCollider();
            Collider.Radius = 0.075f;

            lifeTime = 0;
        }