Example #1
0
    public void Start()
    {
        man = FindObjectOfType <GameManager>();
        inv = FindObjectOfType <InventoryMana>();

        string CliList  = File.ReadAllText(Application.dataPath + "/ClientInfo" + "/ClientlistJS.json");
        string DeadList = File.ReadAllText(Application.dataPath + "/ClientInfo" + "/DeathListJS.json");

        // ClientList = (TextAsset)Resources.Load("Clients_List");
        // DeathList = (TextAsset)Resources.Load("Deaths_List");

        if (CliList != null)
        {
            Client = (CliList.Split('\n'));
        }
        if (DeadList != null)
        {
            Death = (DeadList.Split('\n'));
        }

        //JsonUtility.ToJson(Client);
        // File.WriteAllText(Application.dataPath + "/ClientlistJS.json", Client[2]);

        // File.WriteAllText(Application.dataPath + "/ClientlistJS.json", Client[1]);
    }
Example #2
0
    void Start()
    {
        mann   = GameObject.FindObjectOfType <GameManager>().GetComponent <GameManager>();
        uimann = GameObject.FindObjectOfType <UIManager>();
        invman = GameObject.FindObjectOfType <InventoryMana>().GetComponent <InventoryMana>();
        climan = FindObjectOfType <ClientMana>();

        //mann = mann

        //invman =

        if (mann.tutorial)
        {
            namenum  = 0;
            Deathnum = 0;
        }



        //  Debug.Log(invman.headstoneList.Count);

        RequestedHeadstone = invman.headstoneList[headnum].GetComponent <headstoneobj>().currentheadstone;
        RequestedCoffin    = invman.CoffinList[coffinnum].GetComponent <Coffinobj>().SelectedCoffin;

        clientName.text   = ("Name:\n" + climan.Client[namenum]);
        Causeofdeath.text = ("Cause of Death:\n" + climan.Death[Deathnum]);
        client            = climan.Client[namenum];
        //  name.text = ("Name:\n"+client);
        Reasonofdeath     = climan.Death[Deathnum];
        Causeofdeath.text = ("Cause of Death:\n" + Reasonofdeath);


        climan.openclients.Insert(0, this);
        payr.text      = ("Pay: " + Pay.ToString());
        timetocom.text = ("Time to Complete: " + timetocomplete.ToString());
        currentstatus  = Status.notstarted;
        //txtcontents = textAsset.text;
        jobstatus.text = "Current Status: Not Started";
    }