Esempio n. 1
0
 new void Awake()
 {
     base.Awake();
     isPlayer = false;
     if (self)
     {
         I_EnemyMessenger   = self.GetComponent <EnemyMessenger>();
         I_EnemyDataManager = self.GetComponent <EnemyDataManager>();
         behaviorTree       = self.GetComponent <BehaviorTree>();
     }
 }
Esempio n. 2
0
 private void Awake()
 {
     if (EnemyManager == null)
     {
         DontDestroyOnLoad(gameObject);
         EnemyManager = this;
     }
     else if (EnemyManager != this)
     {
         Destroy(gameObject);
     }
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
 void Awake()
 {
     if (control == null)
     {
         DontDestroyOnLoad(this);
         control         = this;
         filteredEnemies = listOfEnemies;
         //ChooseFromAllEnemies (5);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Esempio n. 5
0
 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();
     }
 }
Esempio n. 6
0
 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);
 }
Esempio n. 7
0
    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);
    }
Esempio n. 8
0
 public virtual void Attack(DataManager target, EnemyDataManager monster)
 {
 }