new void Awake() { base.Awake(); isPlayer = false; if (self) { I_EnemyMessenger = self.GetComponent <EnemyMessenger>(); I_EnemyDataManager = self.GetComponent <EnemyDataManager>(); behaviorTree = self.GetComponent <BehaviorTree>(); } }
private void Awake() { if (EnemyManager == null) { DontDestroyOnLoad(gameObject); EnemyManager = this; } else if (EnemyManager != this) { Destroy(gameObject); } }
private void assignMonsterValues(SecondaryMonster monster, EnemyDataManager enemyManager) { enemyManager.combatIcon = monster.iconSprite; enemyManager.combatSprite = monster.combatSprite; enemyManager.currentName = monster.monsterName; enemyManager.health = monster.health; enemyManager.experienceGives = monster.experienceToGive; enemyManager.speed = monster.speed; enemyManager.currentID = monster.monsterIdentifier; EnemyDataManager.EnemyManager.amountOfEnemies = 2; enemyManager.theMonster = this; }
void Awake() { if (control == null) { DontDestroyOnLoad(this); control = this; filteredEnemies = listOfEnemies; //ChooseFromAllEnemies (5); } else { Destroy(gameObject); } }
public override void Attack(DataManager target, EnemyDataManager monster) { whichAttack = Random.Range(1, 3); textWasPrompt = false; displayedDamage = false; monsterName = monster.currentName; Debug.Log("Slime target: " + target.theName); if (whichAttack == 1) { Launch(target); } else if (whichAttack == 2) { JumpMenancingly(); } }
private void Attack(EnemyDataManager enemy, DataManager character) { CombatTextManager.combatTextManager.ManageText(character.theName + " does " + character.qDamage.ToString() + " damage!"); //TODO: play enemy sprite damaged animation CombatTextManager.combatTextManager.damageText.text = "-" + character.qDamage.ToString(); CombatTextManager.combatTextManager.StartCoroutine(CombatTextManager.combatTextManager.FadeText(CombatTextManager.combatTextManager.damageText)); CombatTextManager.combatTextManager.StartCoroutine(CombatTextManager.combatTextManager.WaitForKeyDown()); character.enemyToTarget = null; if (enemy.health > 0) { enemy.health -= character.qDamage; } if (character == JunakDataManager.Junak) { Tools.junakChosenOrder = 0; } else if (character == SaralfDataManager.Saralf) { Tools.saralfChosenOrder = 0; } dealWithDead(enemy); }
public void selectEnemy(string enemy) { EnemyDataManager chosenEnemy = null; if (enemy == "EnemyOne") { chosenEnemy = EnemyDataManager.EnemyManager; } else if (enemy == "EnemyTwo") { chosenEnemy = EnemyDataManagerTwo.EnemyManagerTwo; } if (JunakDataManager.Junak.isTurnInCombat) { JunakDataManager.Junak.enemyToTarget = chosenEnemy; } else if (SaralfDataManager.Saralf.isTurnInCombat) { SaralfDataManager.Saralf.enemyToTarget = chosenEnemy; } CombatMenuManager.combatMenuManager.enemySelectPanel.SetActive(false); }
public virtual void Attack(DataManager target, EnemyDataManager monster) { }