Ejemplo n.º 1
0
    /*
     * public void InitPlayer(Modificador mod)
     * {
     *  health = 1;
     *  damage = 1;
     *  switch(mod.Ataque)
     *  {
     *      case Ataque.DASH:
     *          attack = new Attack(Dash);
     *          break;
     *      case Ataque.DISTANTIA:
     *          municiones = new Municion[MUNICION_NUM];
     *          for (int i = 0; i< MUNICION_NUM;i++)
     *          {
     *              municiones[i] = Instantiate<Municion>(municion);
     *          }
     *          attack = new Attack(AtkDistantia);
     *          break;
     *      case Ataque.EXPLOTION:
     *          explosivos = new Explosivo[EXPLOSIVO_NUM];
     *          for (int i = 0; i < EXPLOSIVO_NUM; i++)
     *          {
     *              explosivos[i] = Instantiate<Explosivo>(explosivo);
     *          }
     *          attack = new Attack(Explosive);
     *          break;
     *  }
     *  infect = false;
     *  for (int i = 0; i < 2; i++)
     *  {
     *      switch (mod.pasivos[i])
     *      {
     *          case Pasivo.MAS_DANYO:
     *              damage+=0.5f;
     *              continue;
     *          case Pasivo.MAS_VIDA:
     *              health++;
     *              continue;
     *      }
     *  }
     *
     *
     * }*/

    public void InitPlayer(SceneController c)
    {
        controller = c;
        health     = 1;
        guimanager.UpdateVida(health);
        attack     = new Attack(Dash);
        municiones = new Municion[MUNICION_NUM];
        for (int i = 0; i < MUNICION_NUM; i++)
        {
            municiones[i] = Instantiate <Municion>(municion);
        }
        explosivos = new Explosivo[EXPLOSIVO_NUM];
        for (int i = 0; i < EXPLOSIVO_NUM; i++)
        {
            explosivos[i] = Instantiate <Explosivo>(explosivo);
        }
    }
Ejemplo n.º 2
0
 public void initSetting(Vector3 initPos)
 {
     time_atk_distancia = 0;
     time_atk_explosive = 0;
     attack             = new Attack(Dash);
     health             = 1;
     guimanager         = GUI.GetComponent <GUImanager>();
     guimanager.UpdateVida(health);
     transform.position = initPos;
 }