示例#1
0
 public void Initialize()
 {
     if (instance != null)
     {
         Destroy(instance);
     }
     instance = this;
     dummy.Initialize();
     AddItem(DataStorageKeyset.MyKey, MyKey);
 }
示例#2
0
    private DummyContainer CreateTestContainer()
    {
        GameObject containerGo = new GameObject();
        GameObject itemGo      = new GameObject();

        itemGo.transform.SetParent(containerGo.transform);
        DummyContainer container = containerGo.AddComponent <DummyContainer>();
        DummyItem      item      = itemGo.AddComponent <DummyItem>();

        container.ItemTemplate = item;
        container.Initialize();

        return(container);
    }