예제 #1
0
 // Use this for initialization
 void Start()
 {
     tempID     = Random.Range(0, 151);
     attackData = GameObject.FindGameObjectWithTag("AttackData").GetComponent <PokemonAttacks>();
     pokeDex    = GameObject.FindGameObjectWithTag("Library").GetComponent <PokemonLibrary>();
     gif        = this.GetComponent <GifRenderer>();
     gui        = GameObject.FindGameObjectWithTag("GUIScripts").GetComponent <GUIScript>();
     tc         = GameObject.FindGameObjectWithTag("TurnController").GetComponent <TurnController>();
     Init();
 }
 /// <summary>
 /// The init class that sets all the inital variables and gets the other scripts needed
 /// </summary>
 private void Init()
 {
     //Console.WriteLine("PK : Generate Attacks: Initalizing");
     enemyStats  = GameObject.FindGameObjectWithTag("Enemy").GetComponent <EnemyPokemonHandler>();
     playerStats = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerPokemonHandler>();
     attackData  = GameObject.FindGameObjectWithTag("AttackData").GetComponent <PokemonAttacks>();
     adc         = GameObject.FindGameObjectWithTag("Attacks").GetComponent <AttackDamageCalc>();
     //Console.WriteLine("PK : Generate Attacks: Initalized");
     //Debug.Log("name1:" + pcb.PokemonName + "name2:" + playerPokemonName1);
     attacksGenerated = false;
 }
예제 #3
0
    public void SpecialCasesInit()
    {
        //Console.WriteLine("PK : Attack Switch Case: Initalizing");

        enemyStats  = GameObject.FindGameObjectWithTag("Enemy").GetComponent <EnemyPokemonHandler>();
        playerStats = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerPokemonHandler>();
        attackCalc  = GameObject.FindGameObjectWithTag("Attacks").GetComponent <AttackDamageCalc>();
        //genAttacks = GameObject.FindGameObjectWithTag("Attacks").GetComponent<GenerateAttacks>();
        attacks = GameObject.FindGameObjectWithTag("AttackData").GetComponent <PokemonAttacks>();
        tc      = GameObject.FindGameObjectWithTag("TurnController").GetComponent <TurnController>();

        //Console.WriteLine("PK : Attack Switch Case: Initalized");
    }
    private void Init()
    {
        Console.WriteLine("PK : Attack Damage Calculator: Initalizing");
        enemyStats = GameObject.FindGameObjectWithTag("Enemy").GetComponent <EnemyPokemonHandler>();
        if (enemyStats == null)
        {
            Debug.LogError("No Enemy Stats");
        }
        playerStats = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerPokemonHandler>();
        if (playerStats == null)
        {
            Debug.Log("No Player Stats");
        }

        attacks = GameObject.FindGameObjectWithTag("AttackData").GetComponent <PokemonAttacks>();
        //genAttacks = GameObject.FindGameObjectWithTag("Attacks").GetComponent<GenerateAttacks>();
        attack_Switch_Case = GameObject.FindGameObjectWithTag("Attacks").GetComponent <Attack_Switch_Case>();
        damage_mult        = GameObject.FindGameObjectWithTag("dmg_mult").GetComponent <PokemonDamageMultipliers>();
        tc = GameObject.FindGameObjectWithTag("TurnController").GetComponent <TurnController>();
        Console.WriteLine("PK : Attack Damage Calculator: Initalized");
    }
 // Use this for initialization
 void Start()
 {
     tempID = Random.Range(0, 151);
     attackData = GameObject.FindGameObjectWithTag("AttackData").GetComponent<PokemonAttacks>();
     pokeDex = GameObject.FindGameObjectWithTag("Library").GetComponent<PokemonLibrary>();
     gif = this.GetComponent<GifRenderer>();
     gui = GameObject.FindGameObjectWithTag("GUIScripts").GetComponent<GUIScript>();
     tc = GameObject.FindGameObjectWithTag("TurnController").GetComponent<TurnController>();
     Init();
 }
 /// <summary>
 /// The init class that sets all the inital variables and gets the other scripts needed
 /// </summary>
 private void Init()
 {
     //Console.WriteLine("PK : Generate Attacks: Initalizing");
     enemyStats = GameObject.FindGameObjectWithTag("Enemy").GetComponent<EnemyPokemonHandler>();
     playerStats = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerPokemonHandler>();
     attackData = GameObject.FindGameObjectWithTag("AttackData").GetComponent<PokemonAttacks>();
     adc = GameObject.FindGameObjectWithTag("Attacks").GetComponent<AttackDamageCalc>();
     //Console.WriteLine("PK : Generate Attacks: Initalized");
     //Debug.Log("name1:" + pcb.PokemonName + "name2:" + playerPokemonName1);
     attacksGenerated = false;
 }
    private void Init()
    {
        Console.WriteLine("PK : Attack Damage Calculator: Initalizing");
        enemyStats = GameObject.FindGameObjectWithTag("Enemy").GetComponent<EnemyPokemonHandler>();
        if(enemyStats == null)
        {
            Debug.LogError("No Enemy Stats");
        }
        playerStats = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerPokemonHandler>();
        if(playerStats == null)
        {
            Debug.Log("No Player Stats");
        }

        attacks = GameObject.FindGameObjectWithTag("AttackData").GetComponent<PokemonAttacks>();
        //genAttacks = GameObject.FindGameObjectWithTag("Attacks").GetComponent<GenerateAttacks>();
        attack_Switch_Case = GameObject.FindGameObjectWithTag("Attacks").GetComponent<Attack_Switch_Case>();
        damage_mult = GameObject.FindGameObjectWithTag("dmg_mult").GetComponent<PokemonDamageMultipliers>();
        tc = GameObject.FindGameObjectWithTag("TurnController").GetComponent<TurnController>();
        Console.WriteLine("PK : Attack Damage Calculator: Initalized");
    }
    public void SpecialCasesInit()
    {
        //Console.WriteLine("PK : Attack Switch Case: Initalizing");

        enemyStats = GameObject.FindGameObjectWithTag("Enemy").GetComponent<EnemyPokemonHandler>();
        playerStats = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerPokemonHandler>();
        attackCalc = GameObject.FindGameObjectWithTag("Attacks").GetComponent<AttackDamageCalc>();
        //genAttacks = GameObject.FindGameObjectWithTag("Attacks").GetComponent<GenerateAttacks>();
        attacks = GameObject.FindGameObjectWithTag("AttackData").GetComponent<PokemonAttacks>();
        tc = GameObject.FindGameObjectWithTag("TurnController").GetComponent<TurnController>();

        //Console.WriteLine("PK : Attack Switch Case: Initalized");
    }