本文整理汇总了C#中SelectorProtocol类的典型用法代码示例。如果您正苦于以下问题:C# SelectorProtocol类的具体用法?C# SelectorProtocol怎么用?C# SelectorProtocol使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SelectorProtocol类属于命名空间,在下文中一共展示了SelectorProtocol类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: itemFromString
/// <summary>
/// creates a menu item from a string with a target/selector
/// </summary>
public static CCMenuItemFont itemFromString(string value, SelectorProtocol target, SEL_MenuHandler selector)
{
CCMenuItemFont pRet = new CCMenuItemFont();
pRet.initFromString(value, target, selector);
//pRet->autorelease();
return pRet;
}
示例2: itemFromString
/// <summary>
/// creates a menu item from a string and atlas. Use it with MenuItemToggle
/// </summary>
public static CCMenuItemAtlasFont itemFromString(string value, string charMapFile, int itemWidth, int itemHeight, char startCharMap, SelectorProtocol target, SEL_MenuHandler selector)
{
CCMenuItemAtlasFont pRet = new CCMenuItemAtlasFont();
pRet.initFromString(value, charMapFile, itemWidth, itemHeight, startCharMap, target, selector);
//pRet->autorelease();
return pRet;
}
示例3: itemWithTarget
/// <summary>
/// Creates a CCMenuItem with a target/selector
/// </summary>
/// <param name="rec"></param>
/// <param name="selector"></param>
/// <returns></returns>
public static CCMenuItem itemWithTarget(SelectorProtocol rec, SEL_MenuHandler selector)
{
CCMenuItem pRet = new CCMenuItem();
pRet.initWithTarget(rec, selector);
return pRet;
}
示例4: InitFromString
/// <summary>
/// initializes a menu item from a string and atlas with a target/selector
/// </summary>
public bool InitFromString(string value, string charMapFile, int itemWidth, int itemHeight, char startCharMap, SelectorProtocol target,
SEL_MenuHandler selector)
{
// CCAssert( value != NULL && strlen(value) != 0, "value length must be greater than 0");
var label = new CCLabelAtlas(value, charMapFile, itemWidth, itemHeight, startCharMap);
base.InitWithLabel(label, selector);
return true;
}
示例5: initWithTarget
/// <summary>
/// Initializes a CCMenuItem with a target/selector
/// </summary>
/// <param name="rec"></param>
/// <param name="selector"></param>
/// <returns></returns>
public bool initWithTarget(SelectorProtocol rec, SEL_MenuHandler selector)
{
anchorPoint = new CCPoint(0.5f, 0.5f);
m_pListener = rec;
m_pfnSelector = selector;
m_bIsEnabled = true;
m_bIsSelected = false;
return true;
}
示例6: initWithTarget
// todo
//public static CCCallFuncN actionWithScriptFuncName(string pszFuncName)
//{
// CCCallFuncN pRet = new CCCallFuncN();
// if (pRet && pRet->initWithScriptFuncName(pszFuncName)) {
// pRet->autorelease();
// return pRet;
// }
// CC_SAFE_DELETE(pRet);
// return NULL;
//}
public bool initWithTarget(SelectorProtocol pSelectorTarget, SEL_CallFuncN selector)
{
if (base.initWithTarget(pSelectorTarget))
{
m_pCallFuncN = selector;
return true;
}
return false;
}
示例7: itemFromNormalImage
/// <summary>
/// creates a menu item with a normal and selected image with target/selector
/// </summary>
public static CCMenuItemImage itemFromNormalImage(string normalImage, string selectedImage, string disabledImage, SelectorProtocol target, SEL_MenuHandler selector)
{
CCMenuItemImage pRet = new CCMenuItemImage();
if (pRet.initFromNormalImage(normalImage, selectedImage, disabledImage, target, selector))
{
return pRet;
}
return null;
}
示例8: actionWithTarget
public static CCCallFuncO actionWithTarget(SelectorProtocol pSelectorTarget, SEL_CallFuncO selector, CCObject pObject)
{
CCCallFuncO pRet = new CCCallFuncO();
if (pRet != null && pRet.initWithTarget(pSelectorTarget, selector, pObject))
{
return pRet;
}
return null;
}
示例9: initWithTarget
// todo
//public static CCCallFuncO actionWithScriptFuncName(string pszFuncName)
//{
// CCCallFuncO pRet = new CCCallFuncO();
// if (pRet != null && pRet.initWithScriptFuncName(pszFuncName)) {
// return pRet;
// }
// return null;
//}
public bool initWithTarget(SelectorProtocol pSelectorTarget, SEL_CallFuncO selector, CCObject pObject)
{
if (base.initWithTarget(pSelectorTarget))
{
m_pObject = pObject;
m_pCallFuncO = selector;
return true;
}
return false;
}
示例10: actionWithTarget
public static CCCallFuncN actionWithTarget(SelectorProtocol pSelectorTarget, SEL_CallFuncN selector)
{
CCCallFuncN pRet = new CCCallFuncN();
if (pRet != null && pRet.initWithTarget(pSelectorTarget, selector))
{
return pRet;
}
return null;
}
示例11: initFromString
/// <summary>
/// initializes a menu item from a string and atlas with a target/selector
/// </summary>
public bool initFromString(string value, string charMapFile, int itemWidth, int itemHeight, char startCharMap, SelectorProtocol target, SEL_MenuHandler selector)
{
// CCAssert( value != NULL && strlen(value) != 0, "value length must be greater than 0");
CCLabelAtlas label = new CCLabelAtlas();
label.initWithString(value, charMapFile, itemWidth, itemHeight, startCharMap);
//label->autorelease();
if (base.initWithLabel(label, target, selector))
{
// do something ?
}
return true;
}
示例12: actionWithTarget
public static CCCallFunc actionWithTarget(SelectorProtocol pSelectorTarget, SEL_CallFunc selector)
{
CCCallFunc pRet = new CCCallFunc();
if (pRet != null && pRet.initWithTarget(pSelectorTarget))
{
pRet.m_pCallFunc = selector;
return pRet;
}
return null;
}
示例13: initWithTarget
// todo
//public static CCCallFuncND actionWithScriptFuncName(string pszFuncName, object d)
//{
// CCCallFuncND pRet = new CCCallFuncND();
// if (pRet != null && pRet.initWithScriptFuncName(pszFuncName))
// {
// pRet.m_pData = d;
// return pRet;
// }
// return null;
//}
public bool initWithTarget(SelectorProtocol pSelectorTarget,
SEL_CallFuncND selector, object d)
{
if (base.initWithTarget(pSelectorTarget))
{
m_pData = d;
m_pCallFuncND = selector;
return true;
}
return false;
}
示例14: actionWithTarget
public static CCCallFuncND actionWithTarget(SelectorProtocol pSelectorTarget,
SEL_CallFuncND selector, object d)
{
CCCallFuncND pRet = new CCCallFuncND();
if (pRet != null && pRet.initWithTarget(pSelectorTarget, selector, d))
{
return pRet;
}
return null;
}
示例15: CCTimer
public CCTimer(CCScheduler scheduler, SelectorProtocol target, SEL_SCHEDULE selector, float seconds, uint repeat, float delay)
{
_scheduler = scheduler;
Target = target;
Selector = selector;
Elapsed = -1;
OriginalInterval = seconds;
Interval = seconds;
m_fDelay = delay;
m_bUseDelay = delay > 0f;
m_nRepeat = repeat;
m_bRunForever = m_nRepeat == uint.MaxValue;
}