Example #1
0
	public void SetFoeStats (Foes foe) {
		thisFoe = foe;
		health = foe.foeHealth;
		//speed = foe.foeSpeed;
		m_name = foe.foeName;
		dmg = foe.foeDmg;
		id = foe.foeID;
	}
Example #2
0
    public Battle(InGameActor[] Player, InGameActor[] Foe)
    {
        foreach (var item in Player)
        {
            Players.Add(item.actor);
        }

        foreach (var item in Foe)
        {
            Foes.Add(item.actor);
        }
    }
Example #3
0
    //Unity Mode

    public Battle(Actor[] Player, Actor[] Foe)
    {
        foreach (var item in Player)
        {
            Players.Add(item);
        }

        foreach (var item in Foe)
        {
            Foes.Add(item);
        }
    }
Example #4
0
	void SetFoeStats (Foes foe, int i) {
		health = foe.foeHealth;
		maxHealth = foe.foeHealth;
      
		if ((i >= 8) && (i <= 10)) {
			print ("Boss");
			//healthBarAmount = health / 100;
			//miniFoeHUD.SetActive (mainHUDopen);
			//foeHUD.SetActive (!mainHUDopen);
			//bossIsAlive = true;
			//Boss.SetHUD (statFoeHUD, statMiniFoeHUD, statFoeHealthBar, statMiniFoeHealthBar, healthBarAmount, foe);
		}
		speed = foe.foeSpeed;
		damage = foe.foeDmg;
	}
Example #5
0
        public void Add(ICharacter character, Enums.CharacterMatchup matchup)
        {
            switch (matchup)
            {
            case Enums.CharacterMatchup.Foe: {
                Foes.Add(character);
            }
            break;

            case Enums.CharacterMatchup.Friend: {
                Friends.Add(character);
            }
            break;

            case Enums.CharacterMatchup.Self: {
                Self.Add(character);
            }
            break;
            }
        }
Example #6
0
	// Update is called once per frame
	void Update () {

		if (bossIsActive) {
			thisfoe = foeData.GetFoeByName (gameObject.name);
			attributes.SetFoeStats (thisfoe);

			displays.bossUIName.text = attributes.m_name;
			health = attributes.health;
			maxHealth = health;

			barCount = (int)health / 100;
			barHealth = health / barCount;
			for (int i = 0; i < barCount; i++) {
				Image newBar = Instantiate (initBar);
				newBar.name = "Boss Health_Bar" + i;
				newBar.transform.SetParent (barArea.transform);
				newBar.transform.localScale = new Vector3 (1, 1, 1);
				newBar.transform.localPosition = new Vector3 (-270, 0, 0);
				if (i == 0) {
					newBar.color = Color.red;
				} else if (i == 1) {
					newBar.color = Color.yellow;
				} else if (i == 2) {
					newBar.color = Color.green;
				} else if (i == 3) {
					newBar.color = Color.blue;
				} else if (i == 4) {
					newBar.color = Color.gray;
				} else if (i == 5) {
					newBar.color = Color.black;
				}
				barList.Add (newBar);
			}
			bossIsActive = false;
		}
		attributes.health = health;
	}
Example #7
0
 public bool IsTeamWith(Actor a, Actor b)
 {
     return((a != b) && ((Players.Contains(a) && Players.Contains(b)) || (Foes.Contains(a) && Foes.Contains(b))));
 }