Exemplo n.º 1
0
 private void setBonusMalusEthnie(Player.ethnie e)
 {
     if (e == Player.ethnie.arab)
     {
         ethnieDesc.text = "Vole 20% d'argent en plus";
     }
     else if (e == Player.ethnie.asian)
     {
         ethnieDesc.text = "Meilleur en Kung Fu (coming soon)";
     }
     else if (e == Player.ethnie.black)
     {
         ethnieDesc.text = "Court plus vite";
     }
     else
     {
         ethnieDesc.text = "-";
     }
 }
Exemplo n.º 2
0
    /*
     *@brief : update the ui of the Player
     */
    public void changeUI(bool sexuality, Player.ethnie e, bool isCurrent)
    {
        resetUI();


        if (sexuality)
        {
            changeEthnieUI(e, armM);
            changeEthnieUI(e, headM);
            this.legM.gameObject.SetActive(true);
            this.hairM.gameObject.SetActive(true);
            this.bodyM.gameObject.SetActive(true);
            if (isCurrent && GameManager.instance.getPlayerGameObject().GetComponent <SkinPlayer>() != null)
            {
                Debug.Log("coucou");
                GameManager.instance.getPlayerGameObject().GetComponent <SkinPlayer>().changeChest(bodyM.GetComponent <Image>().sprite);
                GameManager.instance.getPlayerGameObject().GetComponent <SkinPlayer>().changeHair(hairM.GetComponent <Image>().sprite);
                GameManager.instance.getPlayerGameObject().GetComponent <SkinPlayer>().changeHead(headM.GetComponent <Image>().sprite);
            }
        }
        else
        {
            changeEthnieUI(e, armW);
            changeEthnieUI(e, headW);
            this.legW.gameObject.SetActive(true);
            this.hairW.gameObject.SetActive(true);
            this.bodyW.gameObject.SetActive(true);
            if (isCurrent && GameManager.instance.getPlayerGameObject().GetComponent <SkinPlayer>() != null)
            {
                Debug.Log("coucou");
                GameManager.instance.getPlayerGameObject().GetComponent <SkinPlayer>().changeChest(bodyW.GetComponent <Image>().sprite);
                GameManager.instance.getPlayerGameObject().GetComponent <SkinPlayer>().changeHair(hairW.GetComponent <Image>().sprite);
                GameManager.instance.getPlayerGameObject().GetComponent <SkinPlayer>().changeHead(headW.GetComponent <Image>().sprite);
            }
        }

        // change on the player
        if (isCurrent && GameManager.instance.getPlayerGameObject().GetComponent <SkinPlayer>() != null)
        {
            GameManager.instance.getPlayerGameObject().GetComponent <SkinPlayer>().changeSkinColor(c);
        }
    }
Exemplo n.º 3
0
 /*
  *@brief : update the ethine ui of the Player
  */
 public void changeEthnieUI(Player.ethnie e, Image im)
 {
     if (e == Player.ethnie.white)
     {
         c = white;
     }
     else if (e == Player.ethnie.black)
     {
         c = black;
     }
     else if (e == Player.ethnie.arab)
     {
         c = arab;
     }
     else if (e == Player.ethnie.asian)
     {
         c = asian;
     }
     im.gameObject.SetActive(true);
     im.color = c;
 }