コード例 #1
0
    public void GotAItem(ICommonItem commonItem)
    {
        //commonItem.GotItem();

        int itemNum = commonItem.GotItem();

        print("itemNum : " + itemNum.ToString() + " In GameManager");
    }
コード例 #2
0
    //Observer
    public void OnTriggerEnter(Collider other)
    {
        if (other.tag == "ITEMA")
        {
            print("col ITEMA");

            ICommonItem aItem = other.gameObject.GetComponent <ICommonItem>();

            //gameManager.GotAItem(aItem);

            onNotifyGotItemE(aItem.GotItem());
        }
    }