Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        GameObject AtomAbstract;

        if (transform.name == "1")
        {
            AtomAbstract = Instantiate <GameObject>(Hydrogen);
        }
        else
        {
            AtomAbstract = Instantiate <GameObject>(Oxygen);
        }
        AtomAbstract.transform.parent = transform;
        AtomAbstract.tag = "Abstracted";
        AtomAbstract.transform.localPosition = Vector3.zero;
        AtomAbstract.gameObject.SetActive(false);



        textMgm      = GameObject.Find("TextMeshTip").GetComponent <TextMeshManager>();
        textMeshName = UpdateData(0, 0, 0);
        textMgm.DisplayText(textMeshName);
        Debug.Log("Updated");
    }
Beispiel #2
0
 public void EarnMoney(int money)
 {
     Money += money;
     TextMeshManager.InstantiateText(transform.position, "+" + money + "$", Id);
 }