public CKLBGenericTask(CKLBTask parent, CKLBTask.ETASK_PHASE phase, ExecuteCallBack executeCallBack, DieCallBack dieCallBack) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBGenericTask_create(parent != null ? parent.CppObject : IntPtr.Zero, (uint)phase); NativeManagement.intercepCppError(); bind(ptr); m_executeCallBack = executeCallBack; m_dieCallBack = dieCallBack; }
public override void setDelegate(Delegate anyDelegate, String delegateName) { if(delegateName == "execute") { m_executeCallBack = (ExecuteCallBack)anyDelegate; } else if(delegateName == "die") { m_dieCallBack = (DieCallBack)anyDelegate; } else { throw new CKLBException("Unvalid delegate name"); } }
public override void setDelegate(Delegate anyDelegate, String delegateName) { if (delegateName == "execute") { m_executeCallBack = (ExecuteCallBack)anyDelegate; } else if (delegateName == "die") { m_dieCallBack = (DieCallBack)anyDelegate; } else { throw new CKLBException("Unvalid delegate name"); } }