public ConcreteMediator() { minigun = new Minigun(this); assaultRifle = new AssaultRifle(this); flamethrower = new Flamethrower(this); shotgun = new Shotgun(this); sniperRifle = new SniperRifle(this); assaultRifleGreen = new AssaultRifle(this); new GreenLaser(assaultRifleGreen, this); assaultRifleRed = new AssaultRifle(this); new RedLaser(assaultRifleRed, this); sniperRifleGreen = new SniperRifle(this); new GreenLaser(sniperRifleGreen, this); sniperRifleRed = new SniperRifle(this); new RedLaser(sniperRifleRed, this); weaponsList = new List <Weapon>(); weaponsList.Add(minigun); weaponsList.Add(assaultRifle); weaponsList.Add(flamethrower); weaponsList.Add(shotgun); weaponsList.Add(sniperRifle); weaponsList.Add(assaultRifleGreen); weaponsList.Add(assaultRifleRed); weaponsList.Add(sniperRifleGreen); weaponsList.Add(sniperRifleRed); }
private void OnTriggerEnter(Collider other) { if (other.gameObject.layer == 18 && flame == null) { flame = other.gameObject.GetComponent <Flamethrower>(); } }
public static Item CreateRandomItem(int level, ItemType itemType) { if (itemType == ItemType.Cannon) { return(Cannon.CreateRandomCannon(level)); } else if (itemType == ItemType.EMPGenerator) { return(EMPGenerator.CreateRandomEMPGenerator(level)); } else if (itemType == ItemType.Engine) { return(Engine.CreateRandomEngine(level)); } else if (itemType == ItemType.Flamethrower) { return(Flamethrower.CreateRandomFlamethrower(level)); } else if (itemType == ItemType.Hangar) { return(Hangar.CreateRandomHangar(level)); } else if (itemType == ItemType.Harpoon) { return(Harpoon.CreateRandomHarpoon(level)); } else if (itemType == ItemType.Hull) { return(Hull.CreateRandomHull(level)); } else if (itemType == ItemType.Laser) { return(Laser.CreateRandomLaser(level)); } else if (itemType == ItemType.LifeSupport) { return(LifeSupport.CreateRandomLifeSupport(level)); } else if (itemType == ItemType.MineLayer) { return(MineLayer.CreateRandomMineLayer(level)); } else if (itemType == ItemType.Reactor) { return(Reactor.CreateRandomReactor(level)); } else if (itemType == ItemType.RocketLauncher) { return(RocketLauncher.CreateRandomRocketLauncher(level)); } else if (itemType == ItemType.ShieldGenerator) { return(ShieldGenerator.CreateRandomShieldGenerator(level)); } else { return(null); } }
void ActivateFlamethrower(bool activate) { Flamethrower flamethrower = TP_Status._instance.flamethrowerObj.GetComponent <Flamethrower>(); if (activate && flamethrower.level > 0) { flamethrower.Activate(); } else { flamethrower.Disactivate(); } }
public Pickupable GetPickupable() { int num = GameState.GetInstance().Random.Next(8); Weapon spawn; switch (num) { case 0: spawn = new Minigun(GameApplication.GetInstance().mediator); break; case 1: spawn = new SniperRifle(GameApplication.GetInstance().mediator); break; case 2: spawn = new Flamethrower(GameApplication.GetInstance().mediator); break; case 3: spawn = new Shotgun(GameApplication.GetInstance().mediator); break; // Weapons with laser case 4: spawn = new SniperRifle(GameApplication.GetInstance().mediator); new RedLaser(spawn, GameApplication.GetInstance().mediator); break; case 5: spawn = new AssaultRifle(GameApplication.GetInstance().mediator); new RedLaser(spawn, GameApplication.GetInstance().mediator); break; case 6: spawn = new SniperRifle(GameApplication.GetInstance().mediator); new GreenLaser(spawn, GameApplication.GetInstance().mediator); break; case 7: spawn = new AssaultRifle(GameApplication.GetInstance().mediator); new GreenLaser(spawn, GameApplication.GetInstance().mediator); break; default: spawn = new AssaultRifle(GameApplication.GetInstance().mediator); break; } return(spawn); }
public void BuyFlamethrower() { if (PlayerModel.Coins < flamethrowerPrice || isFlamethrowerBought) { return; } var gameObject = new GameObject(); Flamethrower rifle = gameObject.AddComponent <Flamethrower>(); rifle.Unlock(); isFlamethrowerBought = true; PlayerModel.ChangeNumberOfCoins(-flamethrowerPrice); }
void Start() { _instance = this; myName = "Flamethrower"; level = 0; upgradeCost = 50; power = 2; duration = 5; timeLeft = duration; attackType = AttackType.Fire; isContinuousAttack = true; isActive = false; recoverySlower = 2; recoveryBooster = 1; }
public void UseSkill(Transform hand) { if (!usingFire) { AudioManager.GetInstance().PlaySound(Sound.FireLoop); usingFire = true; } if (readyTimer <= 0) { GameObject nextFireball = danmakuPool.GetDanmaku(fireballIndex); Flamethrower flamethrowerScript = nextFireball.GetComponent <Flamethrower>(); if (nextFireball != null) { nextFireball.transform.position = hand.position; nextFireball.transform.rotation = hand.rotation; flamethrowerScript.SetOwner(gameObject); nextFireball.SetActive(true); readyTimer = 0.1f; } } }
void SpawnAtCorridor(CorridorSpawner corridorSpawner, int corridorID) { if (Random.Range(0.0f, 1.0f) < spawnChance) { Debug.Log("Spawning flamethrower at " + corridorID); Vector3 position = corridorSpawner.CalculateCorridorPosition(corridorID) + offset; Quaternion rotation = Quaternion.identity; if (Random.Range(0.0f, 1.0f) < 0.5f) { // spawn on the right position += Vector3.right * (laneCount - 1); } else { // spawn on the left rotation.SetLookRotation(Vector3.back); } Flamethrower f = Instantiate(flamethrower, position, rotation); f.throwingFlames = Random.Range(0.0f, 1.0f) < 0.5f; } }
public static IWeapon SwitchWeapon(int index) { GameObject weaponInstance = GameObject.FindGameObjectWithTag("Weapons"); switch (index) { case 0: Pistol pistol = weaponInstance.GetComponent <Pistol>(); SelectedWeapon = Weapons.Pistol; return(pistol); case 1: Shotgun shotgun = weaponInstance.GetComponent <Shotgun>(); SelectedWeapon = Weapons.Shotgun; return(shotgun); case 2: Rifle rifle = weaponInstance.GetComponent <Rifle>(); SelectedWeapon = Weapons.Rifle; return(rifle); case 3: AssaultRifle ar = weaponInstance.GetComponent <AssaultRifle>(); SelectedWeapon = Weapons.AssaultRifle; return(ar); case 4: Flamethrower flamethrower = weaponInstance.GetComponent <Flamethrower>(); SelectedWeapon = Weapons.Flamethrower; return(flamethrower); default: Pistol defaultPistol = weaponInstance.GetComponent <Pistol>(); SelectedWeapon = Weapons.Pistol; return(defaultPistol); } }
void Awake() { move = transform.root.GetComponent <Flamethrower>(); flamethrower = GetComponent <ParticleSystem>(); }
public Infernape(double health, string status) { name = "Infernape"; type1 = new Fire(); type2 = new Fighting(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
private Weapon SetupWeapon(WEAPONTYPE weapon) { Weapon weap = null; switch (weapon) { case WEAPONTYPE.SYRINGE: weap = new Syringe(); break; case WEAPONTYPE.AXE: weap = new Axe(); break; case WEAPONTYPE.SHOTGUN: weap = new Shotgun(); break; case WEAPONTYPE.SUPERSHOTGUN: weap = new SuperShotgun(); break; case WEAPONTYPE.NAILGUN: weap = new NailGun(); break; case WEAPONTYPE.SUPERNAILGUN: weap = new SuperNailGun(); break; case WEAPONTYPE.GRENADELAUNCHER: weap = new GrenadeLauncher(); break; case WEAPONTYPE.PIPEBOMBLAUNCHER: weap = new PipebombLauncher(); break; case WEAPONTYPE.ROCKETLAUNCHER: weap = new RocketLauncher(); break; case WEAPONTYPE.MINIGUN: weap = new Minigun(); break; case WEAPONTYPE.INCENDIARYCANNON: weap = new IncendiaryCannon(); break; case WEAPONTYPE.FLAMETHROWER: weap = new Flamethrower(); break; case WEAPONTYPE.NONE: default: break; } if (weap != null) { weap.Init(_game); weap.Spawn(this, nameof(weap)); } return(weap); }
protected void ChangeLevel( string levelName ) { EntityManager.Clear(); EntityManager.Load(Game.Instance.ContentManager.Load <LevelData>(levelName)); Camera = new Camera(this); LightManager = new LightManager(this); // recreate the lava fires system using the new level parameters if (explosionSystem != null) { explosionSystem.UnloadResources(); } explosionSystem = new LavaExplosion(this, Game.Instance.ContentManager, device, entityManager["lavafire"].GetFloat("size"), entityManager["lavafire"].GetFloat("rgb_multiplier"), entityManager["lavafire"].GetFloat("dot_multiplier")); for (int i = 0; i < 50; ++i) { explosionSystem.AddEmitter(new ProjectMagma.Renderer.ParticleSystem.Emitter.LavaExplosionEmitter()); } // recreate the snow system using the new level parameters if (snowSystem != null) { snowSystem.UnloadResources(); } snowSystem = new Snow(this, Game.Instance.ContentManager, device, entityManager["snow"].GetFloat("particle_lifetime"), entityManager["snow"].GetFloat("max_alpha"), entityManager["snow"].GetFloat("base_size"), entityManager["snow"].GetFloat("random_size_modification"), entityManager["snow"].GetFloat("melting_start"), entityManager["snow"].GetFloat("melting_end")); snowSystem.AddEmitter(new SnowEmitter(EntityManager["snow"].GetFloat("particles_per_second"))); for (int i = 0; i < 1000; ++i) { snowSystem.Update(-30d / 1000d + i * -30d / 1000d, -30d / 1000d + i * -30d / 1000d + 30d / 1000d); } if (iceExplosionSystem != null) { iceExplosionSystem.UnloadResources(); } iceExplosionSystem = new IceExplosion(this, Game.Instance.ContentManager, device); if (fireExplosionSystem != null) { fireExplosionSystem.UnloadResources(); } fireExplosionSystem = new FireExplosion(this, Game.Instance.ContentManager, device); if (flamethrowerSystem != null) { flamethrowerSystem.UnloadResources(); } flamethrowerSystem = new Flamethrower(this, Game.Instance.ContentManager, device); if (iceSpikeSystem != null) { iceSpikeSystem.UnloadResources(); } iceSpikeSystem = new IceSpike(this, Game.Instance.ContentManager, device); }
public Wobbuffet(double health, string status) { name = "Wobbuffet"; type1 = new Psychic(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Goodra(double health, string status) { name = "Goodra"; type1 = new Dragon(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Azumarill(double health, string status) { name = "Azumarill"; type1 = new Water(); type2 = new Fairy(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public LandorusT(double health, string status) { name = "LandorusT"; type1 = new Flying(); type2 = new Ground(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Chesnaught(double health, string status) { name = "Chesnaught"; type1 = new Grass(); type2 = new Fighting(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Lopunny(double health, string status) { name = "Lopunny"; type1 = new Normal(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Mamoswine(double health, string status) { name = "Mamoswine"; type1 = new Ice(); type2 = new Ground(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Magnezone(double health, string status) { name = "Magnezone"; type1 = new Steel(); type2 = new Electric(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Medicham(double health, string status) { name = "Medicham"; type1 = new Psychic(); type2 = new Fighting(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Diancie(double health, string status) { name = "Diancie"; type1 = new Rock(); type2 = new Fairy(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Gengar(double health, string status) { name = "Gengar"; type1 = new Ghost(); type2 = new Poison(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Cloyster(double health, string status) { name = "Cloyster"; type1 = new Water(); type2 = new Ice(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Pinsir(double health, string status) { name = "Pinsir"; type1 = new Bug(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Ferrothorn(double health, string status) { name = "Ferrothorn"; type1 = new Grass(); type2 = new Steel(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Charizard(double health, string status) { name = "Charizard"; type1 = new Flying(); type2 = new Fire(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }
public Galvantula(double health, string status) { name = "Galvantula"; type1 = new Bug(); type2 = new Electric(); estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status); }