本文整理汇总了C#中EZInputDelegate类的典型用法代码示例。如果您正苦于以下问题:C# EZInputDelegate类的具体用法?C# EZInputDelegate怎么用?C# EZInputDelegate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EZInputDelegate类属于命名空间,在下文中一共展示了EZInputDelegate类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddButton
void AddButton( eMainBtnType _type , UIButton _btn , string _text , EZInputDelegate _del , bool isNewImg = false , GameObject goRollingEffect = null , bool isRollingEffect = false )
{
if( m_dicBtn.ContainsKey(_type) == true )
return;
GameObject go = _btn.gameObject;
_btn.Text = _text;
_btn.SetInputDelegate( _del );
AsButtonEffect btnEffect = go.AddComponent<AsButtonEffect>();
m_dicBtn.Add( _type , _btn );
if( isNewImg == true )
SetNewImg( _type , isNewImg );
if( goRollingEffect != null )
{
btnEffect.RollingEffect = goRollingEffect;
btnEffect.SetRollingEffect( isRollingEffect );
}
}
示例2: RemoveInputDelegate
public override void RemoveInputDelegate(EZInputDelegate del)
{
if (knob != null)
knob.RemoveInputDelegate(del);
base.RemoveInputDelegate(del);
}
示例3: AddInputDelegate
public override void AddInputDelegate(EZInputDelegate del)
{
if (knob != null)
knob.AddInputDelegate(del);
base.AddInputDelegate(del);
}
示例4: SetInputDelegate
public override void SetInputDelegate(EZInputDelegate del)
{
if(knob != null)
knob.SetInputDelegate(del);
base.SetInputDelegate(del);
}
示例5: RemoveInputDelegate
public virtual void RemoveInputDelegate(EZInputDelegate del)
{
inputDelegate -= del;
}
示例6: AddInputDelegate
public virtual void AddInputDelegate(EZInputDelegate del)
{
inputDelegate += del;
}
示例7: SetInputDelegate
public virtual void SetInputDelegate(EZInputDelegate del)
{
inputDelegate = del;
}
示例8: RemoveInputDelegate
public void RemoveInputDelegate(EZInputDelegate del) { }
示例9: AddInputDelegate
public void AddInputDelegate(EZInputDelegate del) { }
示例10: SetInputDelegate
public void SetInputDelegate(EZInputDelegate del) { }
示例11: SetInputDelegate
public virtual EZInputDelegate SetInputDelegate(EZInputDelegate del)
{
EZInputDelegate oldDel = inputDelegate;
inputDelegate = del;
return oldDel;
}
示例12: SetInputDelegate
public override EZInputDelegate SetInputDelegate(EZInputDelegate del)
{
if(knob != null)
return knob.SetInputDelegate(del);
return base.SetInputDelegate(del);
}
示例13: Copy
public virtual void Copy(IControl ctl, ControlCopyFlags flags)
{
if (!(ctl is ControlBase))
return;
ControlBase c = (ControlBase)ctl;
// Copy transitions:
if ((flags & ControlCopyFlags.Transitions) == ControlCopyFlags.Transitions)
{
if (c is UIStateToggleBtn3D)
{
if (c.Transitions != null)
{
((UIStateToggleBtn3D)this).transitions = new EZTransitionList[c.Transitions.Length];
for (int i = 0; i < Transitions.Length; ++i)
c.Transitions[i].CopyToNew(Transitions[i], true);
}
}
else
{
if (Transitions != null && c.Transitions != null)
for (int i = 0; i < Transitions.Length && i < c.Transitions.Length; ++i)
c.Transitions[i].CopyTo(Transitions[i], true);
}
}
if ((flags & ControlCopyFlags.Text) == ControlCopyFlags.Text)
{
// See if we want to clone the other
// control's text mesh:
if (spriteText == null && c.spriteText != null)
{
GameObject newText = (GameObject)Instantiate(c.spriteText.gameObject);
newText.transform.parent = transform;
newText.transform.localPosition = c.spriteText.transform.localPosition;
newText.transform.localScale = c.spriteText.transform.localScale;
newText.transform.localRotation = c.spriteText.transform.localRotation;
}
Text = c.Text;
}
if ((flags & ControlCopyFlags.Appearance) == ControlCopyFlags.Appearance)
{
// See if we can copy the other control's collider's settings:
if (collider.GetType() == c.collider.GetType())
{
if (collider is BoxCollider)
{
BoxCollider bc1 = (BoxCollider)collider;
BoxCollider bc2 = (BoxCollider)c.collider;
bc1.center = bc2.center;
bc1.size = bc2.size;
}
else if (collider is SphereCollider)
{
SphereCollider sc1 = (SphereCollider)collider;
SphereCollider sc2 = (SphereCollider)c.collider;
sc1.center = sc2.center;
sc1.radius = sc2.radius;
}
else if (collider is CapsuleCollider)
{
CapsuleCollider cc1 = (CapsuleCollider)collider;
CapsuleCollider cc2 = (CapsuleCollider)c.collider;
cc1.center = cc2.center;
cc1.radius = cc2.radius;
cc1.height = cc2.height;
cc1.direction = cc2.direction;
}
else if (collider is MeshCollider)
{
MeshCollider mc1 = (MeshCollider)collider;
MeshCollider mc2 = (MeshCollider)c.collider;
mc1.smoothSphereCollisions = mc2.smoothSphereCollisions;
mc1.convex = mc2.convex;
mc1.sharedMesh = mc2.sharedMesh;
}
collider.isTrigger = c.collider.isTrigger;
}
}
if ((flags & ControlCopyFlags.Invocation) == ControlCopyFlags.Invocation)
{
changeDelegate = c.changeDelegate;
inputDelegate = c.inputDelegate;
}
if ((flags & ControlCopyFlags.State) == ControlCopyFlags.State)
{
Container = c.Container;
if (Application.isPlaying)
controlIsEnabled = c.controlIsEnabled;
}
}