本文整理汇总了C#中CEvent类的典型用法代码示例。如果您正苦于以下问题:C# CEvent类的具体用法?C# CEvent怎么用?C# CEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CEvent类属于命名空间,在下文中一共展示了CEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnProductPurchased
private static void OnProductPurchased(CEvent e)
{
BillingResult result = e.data as BillingResult;
//this flag will tell you if purchase is available
//result.isSuccess
//infomation about purchase stored here
//result.purchase
//here is how for example you can get product SKU
//result.purchase.SKU
if (result.isSuccess)
{
OnProcessingPurchasedProduct(result.purchase);
}
else
{
AndroidMessage.Create("Product Purchase Failed", result.response.ToString() + " " + result.message);
}
Debug.Log("Purchased Responce: " + result.response.ToString() + " " + result.message);
}
示例2: onLogoClick
void onLogoClick( CEvent e ) {
if( Application.absoluteURL.IndexOf( "uniswf.com" ) == -1 ) {
Application.OpenURL("http://uniswf.com");
}
}
示例3: OnAchievementProgress
private void OnAchievementProgress(CEvent e)
{
Debug.Log ("OnAchievementProgress");
AchievementTemplate tpl = e.data as AchievementTemplate;
Debug.Log (tpl.id + ": " + tpl.progress.ToString());
}
示例4: onRemovedFromStage
private void onRemovedFromStage( CEvent e )
{
removeEventListener(CEvent.ADDED_TO_STAGE, onAddedToStage);
removeEventListener(CEvent.ADDED_TO_STAGE, onRemovedFromStage);
stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
}
示例5: onRatePopUpClose
private void onRatePopUpClose(CEvent e)
{
#if UNITY_WP8
(e.dispatcher as WP8RateUsPopUp).removeEventListener(BaseEvent.COMPLETE, onRatePopUpClose);
string result = e.data.ToString();
WP8PopUps.PopUp.ShowMessageWindow("Result", result + " button pressed");
#endif
}
示例6: RotateRHandler
private void RotateRHandler(CEvent e)
{
if (lastObject != null)
{
lastObject.transform.Rotate(new Vector3(lastObject.transform.localRotation.x, lastObject.transform.localRotation.y, lastObject.transform.localRotation.z - 1.5f));
print("Rotated Right: " + lastObject.transform.localRotation.z);
}
}
示例7: hInc
private void hInc(CEvent e)
{
if (lastObject != null)
{
lastObject.transform.localScale = new Vector3(lastObject.transform.localScale.x, lastObject.transform.localScale.y + 0.1f, lastObject.transform.localScale.z);
print("Height Scaled Up" + lastObject.transform.localScale.y);
}
}
示例8: onDialogClose
private void onDialogClose(CEvent e) {
//removing listner
(e.dispatcher as WP8Dialog).removeEventListener(BaseEvent.COMPLETE, onDialogClose);
string result = e.data.ToString();
WP8PopUps.PopUp.ShowMessageWindow("Result", result + " button pressed");
}
示例9: OnTokenReived
//--------------------------------------
// GET/SET
//--------------------------------------
//--------------------------------------
// EVENTS
//--------------------------------------
private void OnTokenReived(CEvent e)
{
IOSNotificationDeviceToken token = e.data as IOSNotificationDeviceToken;
Debug.Log ("OnTokenReived");
Debug.Log (token.tokenString);
IOSNotificationController.instance.removeEventListener (IOSNotificationController.DEVICE_TOKEN_RECIVED, OnTokenReived);
}
示例10: dispatchEvent
public void dispatchEvent(ref CEvent evt)
{
if(m_szListener.ContainsKey(evt.type))
{
ListenerProc procs = m_szListener[evt.type];
procs.Invoke(evt);
}
}
示例11: OnConnectFinished
private void OnConnectFinished(CEvent e) {
UM_BillingConnectionResult result = e.data as UM_BillingConnectionResult;
if(result.isSuccess) {
Debug.Log("Billing init Success");
// UM_InAppPurchaseManager.instance.RestorePurchases();
} else {
Debug.Log ("Billing init Failed");
}
}
示例12: OnDataReceive
private void OnDataReceive(CEvent e)
{
iCloudData data = e.data as iCloudData;
if(data.IsEmpty) {
IOSNativePopUpManager.showMessage(data.key, "data is empty");
} else {
IOSNativePopUpManager.showMessage(data.key, data.stringValue);
}
}
示例13: BattleUltLoadHandler
/// <summary>
/// 大招引导特效开始
/// </summary>
/// <param name="c">C.</param>
void BattleUltLoadHandler(CEvent c)
{
ShakeBg ();
AudioManager.SharedInstance.PlayOneShot ("ty05", 3.0f);
AttackMessage message = (AttackMessage)c.data;
StartCoroutine ("PlayUltEffect", message);
}
示例14: onLog
void onLog( CEvent e ) {
LogEvent logEvent = e as LogEvent;
debug_txt.alpha = 1;
debug_txt.text = logEvent.logStr;
Tweener.addTween( debug_txt, Tweener.Hash( "time", 1, "alpha", 0, "delay", 3 ) );
}
示例15: OnGCDataRecived
private void OnGCDataRecived(CEvent e)
{
GameCenterDataPackage package = e.data as GameCenterDataPackage;
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
string str = enc.GetString(package.buffer);
IOSNative.showMessage ("Data recived", "player ID: " + package.playerID + " \n " + "data: " + str);
}