Exemple #1
0
    public DefaultEnemy(GenericModelController enemyCon)
    {
        controler = enemyCon;

        int dificultad = PlayerPrefs.GetInt("Dificultad", 0);

        stunOn  = false;
        special = false;

        maxHealth = healths[dificultad];
        damage    = damages[dificultad];
        GameObject.Find("Enemy_Face").renderer.material.mainTexture = Resources.Load(imagenes[dificultad]) as Texture;

        health               = maxHealth;
        healthBar            = GameObject.Find("EnemyHP").GetComponent <LoadingBar>();
        healthBar.barDisplay = 1.0f;
        healthBar.barMin     = 1.0f;
        healthBar.emptyTex   = Resources.Load("health_empty") as Texture2D;
        healthBar.fullTex    = Resources.Load("health_full") as Texture2D;
        healthBar.woundTex   = Resources.Load("health_wound") as Texture2D;

        texto = GameObject.Find("InfoBatalla").GetComponent <TextoBatalla>();
    }
Exemple #2
0
    public Player(PlayerModelController playerCon, BuffController buffs, NPC enem)
    {
        controler = playerCon;
        buffos    = buffs;
        enemy     = enem;

        maxHealth            = 200;
        health               = maxHealth;
        healthBar            = GameObject.Find("PlayerHP").GetComponent <LoadingBar>();
        healthBar.barDisplay = 1.0f;
        healthBar.barMin     = 1.0f;
        healthBar.emptyTex   = Resources.Load("health_empty") as Texture2D;
        healthBar.fullTex    = Resources.Load("health_full") as Texture2D;
        healthBar.woundTex   = Resources.Load("health_wound") as Texture2D;

        GameObject.Find("Shield").renderer.enabled = false;
        defensa = false;

        Clash = GameObject.Find("Clash").particleSystem;
        Clash.Stop();

        PS_spicy = GameObject.Find("PS_Spicy").GetComponent <ParticleSystem>();
        PS_spicy.Stop();

        int points = PlayerPrefs.GetInt("Bpoints", 0);

        if (points > 0)
        {
            multiDamage += 0.2f;
        }
        if (points > 2)
        {
            acido = true;
        }
        if (points > 3)
        {
            multiDamage += 0.3f;
        }

        points = PlayerPrefs.GetInt("Mpoints", 0);
        if (points > 0)
        {
            crit += 0.15f;
        }
        if (points > 2)
        {
            critDamage += 0.4f;
        }
        if (points > 3)
        {
            ira = true;
        }

        points = PlayerPrefs.GetInt("Ipoints", 0);
        if (points > 0)
        {
            resistencia -= 0.2f;
        }
        if (points > 2)
        {
            leech += 0.3f;
        }
        if (points > 3)
        {
            stun += 0.2f;
        }

        texto = GameObject.Find("InfoBatalla").GetComponent <TextoBatalla>();
    }