// Start is called before the first frame update
    void Start()
    {
        // animCard = GetComponent<Animator>();

        /*if(SceneManager.GetActiveScene().name == "TestCardJulien")
         * {
         *  animCard.SetBool("IsCredit", true);
         * }
         * else
         * {
         *  animCard.SetBool("IsCredit", false);
         * }*/

        if (descriptionTransform != null)
        {
            originalDescriptionPosition = descriptionTransform.anchoredPosition;
        }


        //img.SetActive(false);
        card     = GetComponent <CardValuesWithScriptable>();
        material = GetComponent <Image>().material;
        if (SuccesManager.cardSkin != null)
        {
            material = SuccesManager.cardSkin;
        }

        GetComponent <Image>().material = material;
        imgColor    = img.GetComponent <Image>();
        originalPos = transform.position;
        material.SetFloat("_Fade", 1f);
        _mtrl.SetFloat("_opacity", rotateShader);
    }
 void Start()
 {
     objectInTree        = FindObjectOfType <ContainAllObjectTree>()._imageTreeChildAlreadyInTree;
     unlockSinceLastTime = FindObjectOfType <ContainAllObjectTree>()._imageTreeUnlockSinceLastTime;
     alreadyDrawCards    = FindObjectOfType <GameManager>()._savingDrawCardCard;
     apparitionOrder     = FindObjectOfType <GameManager>()._apparitionOrder;
     saveOptions         = FindObjectOfType <PauseMenu>().options;
     card     = FindObjectOfType <CardValuesWithScriptable>();
     contrats = FindObjectOfType <ContratsPanel>();
 }
    public static void SaveCards(CardValuesWithScriptable cardValue, SuccesManager allSucces)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/cards.fun";
        FileStream      stream    = new FileStream(path, FileMode.Create);

        Debug.Log(path);

        CardsData data = new CardsData(cardValue, allSucces);

        formatter.Serialize(stream, data);
        stream.Close();
    }
Beispiel #4
0
    public CardsData(CardValuesWithScriptable cardvalue, SuccesManager allSucces)
    {
        if (cardvalue != null)
        {
            firstCardData = cardvalue._firstCardScriptable.name;
        }


        if (allSucces != null)
        {
            allSuccesData = allSucces.lockInfo;
        }
    }