예제 #1
0
        private static int FFI_Using(ILuaState lua)
        {
            var name = lua.ToString(1);

            UsingList.Add(name);
            return(0);
        }
예제 #2
0
    public T Alloc <T>() where T : Component
    {
        GameObject asset = null;

        if (FreeList.Count > 0)
        {
            asset = FreeList.Pop();
        }
        if (asset == null)
        {
            asset = GameObject.Instantiate <GameObject>(Prefab);
        }
        UsingList.Add(asset);
        asset.gameObject.SetActive(true);

        if (AssetManager.OnChanged != null)
        {
            AssetManager.OnChanged();
        }

        return(asset.GetComponent <T>());
    }
예제 #3
0
 /// <summary>
 /// Adds a using directive to write separately.
 /// </summary>
 public void AddUsing(string usingDirective)
 {
     UsingList.Add(usingDirective);
 }
예제 #4
0
 public void Add(Using @using)
 {
     UsingList.Add(@using);
 }