예제 #1
0
 public void ShowForBoss(BossType boss)
 {
     this.RootDialogObject.SetActive(true);
     UIDialogManager.Instance.ActiveDialog = this.Dialog;
     this.BossName.text = "THE " + boss.Name.ToUpper();
     this.BossImage.sprite = this.BossImages.GetSprites()[this.BossAvatarPrefix + boss.Name.ToLower()];
 }
예제 #2
0
        public Boss CreateBoss(BossType enemyType, Vector2 position)
        {
            Boss boss;
            uint id = NextID();
            switch (enemyType)
            {
                case BossType.Blimp:
                    boss = new Blimp(id, position, content);
                    QueueGameObjectForCreation(new LeftGun(NextID(), content, boss as Blimp));
                    QueueGameObjectForCreation(new RightGun(NextID(), content, boss as Blimp));
                    break;

                case BossType.TwinJetManager:
                    boss = new TwinJetManager(id, content, position);
                    break;
                case BossType.Bird:
                    boss = new Bird(id, content, position);
                    break;
                default:
                    throw new NotImplementedException("The boss type " + Enum.GetName(typeof(BossType), enemyType) + " is not supported");
            }
            boss.ObjectType = ObjectType.Boss;
            QueueGameObjectForCreation(boss);
            return boss;
        }
예제 #3
0
 public Wave(EnemyType enemyType, float spawnDelay, int numberOfEnemies)
 {
     bossType = BossType.Max;
     this.enemyType = enemyType;
     this.spawnDelay = spawnDelay;
     this.numberOfEnemies = numberOfEnemies;
 }
예제 #4
0
 public Wave(BossType bossType, float spawnDelay, int numberOfEnemies)
 {
     enemyType = EnemyType.Max;
     this.bossType = bossType;
     this.spawnDelay = spawnDelay;
     this.numberOfEnemies = numberOfEnemies;
 }
예제 #5
0
        public Boss CreateBoss(BossType enemyType, Vector2 position)
        {
            Boss boss;
            uint id = NextID();
            switch (enemyType)
            {
                case BossType.Blimp:
                    Blimp blimp = new Blimp(id, position, content);
                    LeftGun leftGun = new LeftGun(NextID(), content, blimp);
                    RightGun rightGun = new RightGun(NextID(), content, blimp);
                    leftGun.ObjectType = ObjectType.Boss;
                    rightGun.ObjectType = ObjectType.Boss;
                    blimp.leftGun = leftGun;
                    blimp.rightGun = rightGun;
                    QueueGameObjectForCreation(leftGun);
                    QueueGameObjectForCreation(rightGun);
                    boss = blimp;
                    break;

                case BossType.TwinJetManager:
                    boss = new TwinJetManager(id, content, position);
                    break;

                case BossType.MoonBoss:
                    boss = new MoonBoss(id, content, position);
                    break;

                default:
                    throw new NotImplementedException("The boss type " + Enum.GetName(typeof(BossType), enemyType) + " is not supported");
            }
            boss.ObjectType = ObjectType.Boss;
            QueueGameObjectForCreation(boss);
            return boss;
        }
예제 #6
0
		public override BossData Get(BossType type)
		{
			foreach (BossData d in agentData.Where(d => (BossType)d.Type == type))
				return d;
			var newBossData = DefaultBossPropertiesForTesting.GetDefaultBossData(type);
			agentData.Add(newBossData);
			return newBossData;
		}
		public static BossData GetDefaultBossData(BossType type)
		{
			switch (type)
			{
			case BossType.Cloak:
				defaultBossData = new BossData(type, BossModels.CreepBossCloak.ToString(), 500, 0.5f, 15.0f,
					100, DamageModifierValuesForBoss());
				break;
			}

			return defaultBossData;
		}
예제 #8
0
파일: Boss.cs 프로젝트: whztt07/DeltaEngine
		private void CreateStats(BossType type, BossPropertiesXml properties)
		{
			BossData bossData = properties.Get(type);
			Name = bossData.Name;
			CreateStat("Hp", bossData.MaxHp);
			CreateStat("Speed", bossData.Speed);
			CreateStat("Resistance", bossData.Resistance);
			CreateStat("Gold", bossData.GoldReward);
			if (Player.Current != null)
				ApplyBuff(new BuffEffect(Player.Current.Avatar.GetType().Name + "GoldMultiplier"));

			State = new BossState();
			foreach (var modifier in bossData.TypeDamageModifier)
				State.SetVulnerabilityWithValue(modifier.Key, modifier.Value);
		}
 public BossSpawnEventArgs(TSPlayer player, BossType bossType)
     : base(player)
 {
     this.BossType = bossType;
 }
예제 #10
0
 public Boss(BossType bossType)
 {
     BossType     = bossType;
     BossPointer  = null;
     BossGraphics = 0;
 }
예제 #11
0
		protected CreepData(BossType type, string name, float maxHp, float speed, float resistance,
			int goldReward, Dictionary<TowerType, float> typeDamageModifier)
			: this(name, maxHp, speed, resistance, goldReward, typeDamageModifier)
		{
			Type = type;
		}
예제 #12
0
    void SetBlendShape()
    {
        float _health = health / baseHealth / 3.0f;
        float _speed = speed / basespeed * 100.0f;
        float _atkspeed = atkSpeed / baseAtkSpeed * 100.0f;
        float _damage = damage / basedamage * 100.0f;
        //if (_health > _speed && _health > _damage && _health > _atkspeed)
        //{
        //    skinMeshRenderer.SetBlendShapeWeight(3, 100);
        //    bossType = BossType.HEALTH;
        //}
        //else if (_speed > _atkspeed && _speed > _damage && _speed > _health)
        //{
        //    skinMeshRenderer.SetBlendShapeWeight(2, 100);
        //    bossType = BossType.SPEED;
        //}
        //else if (_atkspeed > _damage && _atkspeed > _speed && _atkspeed > _health)
        //{
        //    skinMeshRenderer.SetBlendShapeWeight(1, 100);
        //    bossType = BossType.RANGE;
        //}
        //else
        //{
        //    skinMeshRenderer.SetBlendShapeWeight(0, 100);
        //    bossType = BossType.DAMAGE;
        //}

        //cos damage looks best
        skinMeshRenderer.SetBlendShapeWeight(0, 100);
        bossType = BossType.DAMAGE;
    }
예제 #13
0
파일: Boss.cs 프로젝트: whztt07/DeltaEngine
		public Boss(BossType type, Vector2D position, float rotationZ = 0.0f)
			: base(position, rotationZ)
		{
			Type = type;
			CreateStats(type, ContentLoader.Load<BossPropertiesXml>(Xml.BossProperties.ToString()));
		}
예제 #14
0
		public virtual BossData Get(BossType type)
		{
			return null;
		}
예제 #15
0
 protected CreepData(BossType type, string name, float maxHp, float speed, float resistance,
                     int goldReward, Dictionary <TowerType, float> typeDamageModifier)
     : this(name, maxHp, speed, resistance, goldReward, typeDamageModifier)
 {
     Type = type;
 }
 private void FormEditBossData_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (int.TryParse(textBoxBossID.Text, out int bossId))
     {
         if (textBoxBossName.Text.Trim() != "")
         {
             if (data == null)
             {
                 BossType type = BossType.None;
                 if (radioButtonTypeRaid.Checked)
                 {
                     type = BossType.Raid;
                 }
                 else if (radioButtonTypeFractal.Checked)
                 {
                     type = BossType.Fractal;
                 }
                 else if (radioButtonTypeStrike.Checked)
                 {
                     type = BossType.Strike;
                 }
                 else if (radioButtonTypeGolem.Checked)
                 {
                     type = BossType.Golem;
                 }
                 else if (radioButtonTypeWvW.Checked)
                 {
                     type = BossType.WvW;
                 }
                 allBosses[reservedId] = new BossData()
                 {
                     BossId     = bossId,
                     Name       = textBoxBossName.Text,
                     SuccessMsg = textBoxSuccessMsg.Text,
                     FailMsg    = textBoxFailMsg.Text,
                     Icon       = textBoxIcon.Text,
                     Type       = type,
                     Event      = checkBoxEvent.Checked
                 };
                 editLink.listViewBosses.Items.Add(new ListViewItem()
                 {
                     Name = reservedId.ToString(), Text = textBoxBossName.Text
                 });
             }
             else
             {
                 BossData boss = allBosses[reservedId];
                 boss.BossId     = bossId;
                 boss.Name       = textBoxBossName.Text;
                 boss.SuccessMsg = textBoxSuccessMsg.Text;
                 boss.FailMsg    = textBoxFailMsg.Text;
                 boss.Icon       = textBoxIcon.Text;
                 BossType type = BossType.None;
                 if (radioButtonTypeRaid.Checked)
                 {
                     type = BossType.Raid;
                 }
                 else if (radioButtonTypeFractal.Checked)
                 {
                     type = BossType.Fractal;
                 }
                 else if (radioButtonTypeStrike.Checked)
                 {
                     type = BossType.Strike;
                 }
                 else if (radioButtonTypeGolem.Checked)
                 {
                     type = BossType.Golem;
                 }
                 else if (radioButtonTypeWvW.Checked)
                 {
                     type = BossType.WvW;
                 }
                 boss.Type  = type;
                 boss.Event = checkBoxEvent.Checked;
                 editLink.listViewBosses.Items[editLink.listViewBosses.Items.IndexOfKey(reservedId.ToString())].Text = textBoxBossName.Text;
             }
         }
     }
 }
예제 #17
0
 public void DeathCounter(BossType type, int value)
 {
     _preferences.Editor().PutInt("DeathCounter-" + type.ToString(), value);
     _preferences.Editor().Apply();
 }
예제 #18
0
 public Boss(BossType type, Vector2D position, float rotationZ = 0.0f)
     : base(position, rotationZ)
 {
     Type = type;
     CreateStats(type, ContentLoader.Load <BossPropertiesXml>(Xml.BossProperties.ToString()));
 }
 private IConditionBuilder BossTypeIs(BossType bossType)
 => MetaStats.SelectedBossType.Value.Eq((int)bossType);
예제 #20
0
 public BossData(BossType type, string name, float maxHp, float speed, float resistance,
                 int goldReward, Dictionary <TowerType, float> typeDamageModifier)
     : base(type, name, maxHp, speed, resistance, goldReward, typeDamageModifier)
 {
 }
예제 #21
0
 public override void Load(BinaryReader reader)
 {
     base.Load(reader);
     type = (BossType)reader.ReadByte();
 }
예제 #22
0
 public BossData(int x, int y, BossType t) : base(x, y)
 {
     type       = t;
     EntityType = EntityType.Boss;
 }
예제 #23
0
 public virtual BossData Get(BossType type)
 {
     return(null);
 }
예제 #24
0
 public Boss(Simulation s, int level = 63, BossType type = BossType.LightArmor, int maxLife = 100000)
     : base(s, level, ArmorByType(type), maxLife)
 {
 }
    /// <summary>
    /// Force sets the environment profile of the specified boss
    /// </summary>
    /// <param name="boss">The boss type</param>
    /// <param name="element">The boss element</param>
    public void SetBossTransition(BossType boss, BossElement element)
    {
        if (boss == BossType.Skeleton)
        {
            switch (element)
            {
            case BossElement.Base:
                SetTransition(skeletonBaseProfile);
                break;

            case BossElement.Grass:
                SetTransition(skeletonGrassProfile);
                break;

            case BossElement.Ice:
                SetTransition(skeletonIceProfile);
                break;

            case BossElement.Fire:
                SetTransition(skeletonFireProfile);
                break;
            }
        }
        else if (boss == BossType.Armour)
        {
            switch (element)
            {
            case BossElement.Base:
                SetTransition(armourBaseProfile);
                break;

            case BossElement.Grass:
                SetTransition(armourGrassProfile);
                break;

            case BossElement.Ice:
                SetTransition(armourIceProfile);
                break;

            case BossElement.Fire:
                SetTransition(armourFireProfile);
                break;
            }
        }
        else if (boss == BossType.Rocky)
        {
            switch (element)
            {
            case BossElement.Base:
                SetTransition(rockBaseProfile);
                break;

            case BossElement.Grass:
                SetTransition(rockGrassProfile);
                break;

            case BossElement.Ice:
                SetTransition(rockIceProfile);
                break;

            case BossElement.Fire:
                SetTransition(rockFireProfile);
                break;
            }
        }
    }
예제 #26
0
    void Update()
    {
        if (!this.AcceptingInput || PauseController.IsPaused())
        {
            return;
        }

        if (MenuInput.AnyInput())
        {
            IntegerVector newPosition = this.CurrentPosition;

            if (this.CurrentPosition.X > -_halfSize && MenuInput.NavLeft())
            {
                newPosition.X -= 1;
            }
            else if (this.CurrentPosition.Y > -_halfSize && MenuInput.NavDown())
            {
                newPosition.Y -= 1;
            }
            else if (this.CurrentPosition.X < _halfSize && MenuInput.NavRight())
            {
                newPosition.X += 1;
            }
            else if (this.CurrentPosition.Y < _halfSize && MenuInput.NavUp())
            {
                newPosition.Y += 1;
            }

            if ((newPosition.X != this.CurrentPosition.X || newPosition.Y != this.CurrentPosition.Y) && _grid[newPosition.X + _halfSize, newPosition.Y + _halfSize] != null)
            {
                moveCurrentTile(newPosition);
            }
            else if (MenuInput.SelectCurrentElement() && _grid[this.CurrentPosition.X + _halfSize, this.CurrentPosition.Y + _halfSize].State == TileState.Available)
            {
                int bossIndex = -1;
                for (int i = 0; i < this.BossTiles.Length; ++i)
                {
                    IntegerVector tile = this.BossTiles[i];

                    if (this.CurrentPosition.X == tile.X && this.CurrentPosition.Y == tile.Y)
                    {
                        bossIndex = i;
                        break;
                    }
                }

                //TODO - Send input to level generation
                ProgressData.SelectTile(this.CurrentPosition);
                if (_allBossesDefeated && this.CurrentPosition.X == 0 && this.CurrentPosition.Y == 0)
                {
                    SceneManager.LoadScene(this.FinalDialogSceneName);
                }
                else if (bossIndex == -1)
                {
                    SceneManager.LoadScene(this.GameplaySceneName);
                }
                else
                {
                    BossType boss = StaticData.BossData.BossTypes[ProgressData.GetCurrentBosses()[bossIndex]];
                    SceneManager.LoadScene(this.BossSceneName + boss.SceneKey);
                }
            }
        }

        else
        {
            if (!_currentBlinkingOff && _timeSinceBlink >= this.BlinkIntervalOn)
            {
                blinkCurrentTileOff();
            }
            else if (_currentBlinkingOff && _timeSinceBlink >= this.BlinkIntervalOff)
            {
                blinkCurrentTileOn();
            }
            else
            {
                _timeSinceBlink += Time.deltaTime;
            }
        }
    }
예제 #27
0
 public void LoadBoss(BossType bossType)
 {
     _boss = BossFactory.CreateBoss(bossType, Game, _player.Position);
 }
예제 #28
0
 public TimeSpan BossPlayTime(BossType type)
 {
     return(TimeSpan.FromSeconds(_preferences.GetFloat("BossPlayTime-" + type.ToString(), 0)));
 }
예제 #29
0
    // Use this for initialization
    void Start()
    {
        playerLocation = GameObject.Find("Player").transform;
        target = new Vector3(0, 0, 0);
        ui = GameObject.Find("PlayerUI").GetComponent<PlayerUI>();

        skinMeshRenderer = GetComponentInChildren<SkinnedMeshRenderer>();

        shooter = GameObject.Find("shooter");

        laser = gameObject.GetComponentInChildren<BossLaser>();

        chargerRenderer = GameObject.Find("Charger").GetComponent<Renderer>();
        chargerCollider = GameObject.Find("Charger").GetComponent<Collider>();

        cocoonCollider = gameObject.GetComponentsInChildren<Collider>()[1];
        cocoonRenderer = gameObject.GetComponentInChildren<MeshRenderer>();

        bossType = BossType.NULL;

        followingPlayer = false;

        chargerRenderer.enabled = false;
        chargerCollider.enabled = false;
    }
예제 #30
0
    public void SpawnEnemy(BossType pBossType)
    {
        int rand = Random.Range(0, 6);

        switch (rand)
        {
        case 0:
            m_goChosenSpawnLocation = m_goBossSpawnLocation1;
            break;

        case 1:
            m_goChosenSpawnLocation = m_goBossSpawnLocation2;
            break;

        case 2:
            m_goChosenSpawnLocation = m_goBossSpawnLocation3;
            break;

        case 3:
            m_goChosenSpawnLocation = m_goBossSpawnLocation4;
            break;

        case 4:
            m_goChosenSpawnLocation = m_goBossSpawnLocation5;
            break;

        case 5:
            m_goChosenSpawnLocation = m_goBossSpawnLocation6;
            break;
        }

        // Instantiates and initialises a boss of a specified type
        if (pBossType == BossType.Scuttler)
        {
            GameObject     objNewScuttlerBoss     = Instantiate(m_goScuttlerBossPrefab);
            BossController scuttlerBossController = objNewScuttlerBoss.GetComponent <BossController>();
            scuttlerBossController.enabled        = false;
            scuttlerBossController.m_btEnemyType  = 0;
            objNewScuttlerBoss.transform.position = m_goChosenSpawnLocation.transform.position;
            scuttlerBossController.enabled        = true;
            scuttlerBossController.m_bIsAlive     = true;
            scuttlerBossController.m_bHealth      = m_bHealthScuttler;
            m_bHasSpawned = true;
            if (m_rcRoundController.m_iCurrentRound == 20)
            {
                scuttlerBossController.m_bHealth = m_bHealthScuttler * 2;
            }
        }

        if (pBossType == BossType.Turret)
        {
            GameObject     objNewTurretBoss     = Instantiate(m_goTurretBossPrefab);
            BossController turretBossController = objNewTurretBoss.GetComponent <BossController>();
            turretBossController.enabled        = false;
            turretBossController.m_btEnemyType  = 1;
            objNewTurretBoss.transform.position = m_goChosenSpawnLocation.transform.position;
            turretBossController.enabled        = true;
            turretBossController.m_bHealth      = m_bHealthTurret;
            turretBossController.m_bIsAlive     = true;
            m_bHasSpawned = true;
            if (m_rcRoundController.m_iCurrentRound == 20)
            {
                turretBossController.m_bHealth = m_bHealthTurret * 2;
            }
        }

        if (pBossType == BossType.Drone)
        {
            GameObject     objNewDroneBoss     = Instantiate(m_goDroneBossPrefab);
            BossController droneBossController = objNewDroneBoss.GetComponent <BossController>();
            droneBossController.enabled        = false;
            droneBossController.m_btEnemyType  = 2;
            objNewDroneBoss.transform.position = m_goChosenSpawnLocation.transform.position;
            droneBossController.enabled        = true;
            droneBossController.m_bHealth      = m_bHealthDrone;
            droneBossController.m_bIsAlive     = true;
            m_bHasSpawned = true;
            if (m_rcRoundController.m_iCurrentRound == 20)
            {
                droneBossController.m_bHealth = m_bHealthDrone * 2;
            }
        }
        m_rcRoundController.m_bBossDead = false;
    }
예제 #31
0
 public BossEnemy(BossPrototype proto) : base(proto)
 {
     bossType = proto.bossType;
     ExpValue = 100;
 }
예제 #32
0
 private static void AddBossIcon(BossType type, string filename)
 {
     ImgBoss.Add(type, Cv2.ImRead(Path.Combine(LoadRemover.ImageFolder, $"boss_{filename}.png")));
     ImgBossMask.Add(type, Cv2.ImRead(Path.Combine(LoadRemover.ImageFolder, $"boss_{filename}_mask.png")));
 }
예제 #33
0
 public int DeathCounter(BossType type)
 {
     return(_preferences.GetInt("DeathCounter-" + type.ToString(), 0));
 }
예제 #34
0
파일: Boss.cs 프로젝트: ky27611/Hero-Runner
 private void ChangeMove(BossType move)
 {
     m_CurrentMove?.Release();
     m_CurrentMove = m_BossMap[move];
     m_CurrentMove.Initialize();
 }
예제 #35
0
		public BossData(BossType type, string name, float maxHp, float speed, float resistance,
			int goldReward, Dictionary<TowerType, float> typeDamageModifier)
			: base(type, name, maxHp, speed, resistance, goldReward, typeDamageModifier) {}
예제 #36
0
 public void BossPlayTime(BossType type, TimeSpan value)
 {
     _preferences.Editor().PutFloat("BossPlayTime-" + type.ToString(), (float)value.TotalSeconds);
     _preferences.Editor().Apply();
 }