Пример #1
0
 public BatallaController(GenericModelController enemyCon, PlayerModelController playerCon)
 {
     buffos      = new BuffController();
     enemy       = new DefaultEnemy(enemyCon);
     player      = new Player(playerCon, buffos, enemy);
     turnoPlayer = true;
 }
Пример #2
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>();
    }