本文整理汇总了C#中EZValueChangedDelegate类的典型用法代码示例。如果您正苦于以下问题:C# EZValueChangedDelegate类的具体用法?C# EZValueChangedDelegate怎么用?C# EZValueChangedDelegate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EZValueChangedDelegate类属于命名空间,在下文中一共展示了EZValueChangedDelegate类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddValueChangedDelegate
public virtual void AddValueChangedDelegate(EZValueChangedDelegate del)
{
changeDelegate += del;
}
示例2: RemoveValueChangedDelegate
public virtual void RemoveValueChangedDelegate(EZValueChangedDelegate del)
{
changeDelegate -= del;
}
示例3: SetValueChangedDelegate
public virtual void SetValueChangedDelegate(EZValueChangedDelegate del)
{
changeDelegate = del;
}
示例4: RemoveValueChangedDelegate
public void RemoveValueChangedDelegate(EZValueChangedDelegate del) { }
示例5: AddValueChangedDelegate
public void AddValueChangedDelegate(EZValueChangedDelegate del) { }
示例6: SetValueChangedDelegate
public void SetValueChangedDelegate(EZValueChangedDelegate del) { }
示例7: SetValueChangedDelegate
public virtual EZValueChangedDelegate SetValueChangedDelegate(EZValueChangedDelegate del)
{
EZValueChangedDelegate oldDel = changeDelegate;
changeDelegate = del;
return oldDel;
}
示例8: 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;
}
}