Exemplo n.º 1
0
 public virtual void OnNewObject()
 {
     effectComp = gameObject.GetComponent <EffectComp>();
     if (effectComp == null)
     {
         effectComp = gameObject.AddComponent <EffectComp>();
     }
     isRecyled = false;
 }
Exemplo n.º 2
0
 public virtual void OnRecycle()
 {
     if (effectComp != null)
     {
         DestroyImmediate(effectComp);
         effectComp = null;
     }
     isRecyled = true;
 }
Exemplo n.º 3
0
    static int get_effectComp(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            EntityBehavior obj = (EntityBehavior)o;
            EffectComp     ret = obj.effectComp;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index effectComp on a nil value" : e.Message));
        }
    }