本文整理汇总了C#中dfControl.GetManager方法的典型用法代码示例。如果您正苦于以下问题:C# dfControl.GetManager方法的具体用法?C# dfControl.GetManager怎么用?C# dfControl.GetManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dfControl
的用法示例。
在下文中一共展示了dfControl.GetManager方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnEnable
void OnEnable()
{
if( mainCamera == null )
{
mainCamera = Camera.main;
if( mainCamera == null )
{
Debug.LogError( "dfFollowObject component is unable to determine which camera is the MainCamera", gameObject );
this.enabled = false;
return;
}
}
myControl = GetComponent<dfControl>();
if( myControl == null )
{
Debug.LogError( "No dfControl component on this GameObject: " + gameObject.name, gameObject );
this.enabled = false;
}
if( myControl == null || attach == null )
{
Debug.LogWarning( "Configuration incomplete: " + this.name );
this.enabled = false;
return;
}
controlTransform = myControl.transform;
followTransform = attach.transform;
// Obtain a reference to the dfGUIManager rendering the control
manager = myControl.GetManager();
dfFollowObjectSorter.Register( this );
}
示例2: hideWindow
IEnumerator hideWindow( dfControl window )
{
busy = true;
isVisible = false;
window.IsVisible = true;
window.GetManager().BringToFront( window );
var opacity = new dfAnimatedFloat( 1f, 0f, 0.33f );
while( opacity > 0.05f )
{
window.Opacity = opacity;
yield return null;
}
window.Opacity = 0f;
busy = false;
}
示例3: showWindow
IEnumerator showWindow( dfControl window )
{
isVisible = true;
busy = true;
window.IsVisible = true;
window.GetManager().BringToFront( window );
var opacity = new dfAnimatedFloat( 0f, 1f, 0.33f );
while( opacity < 0.95f )
{
window.Opacity = opacity;
yield return null;
}
window.Opacity = 1f;
busy = false;
isVisible = true;
}
示例4: Start
public void Start()
{
this.control = GetComponent<dfControl>();
this.manager = control.GetManager();
}
示例5: Awake
/// <summary>
/// Initializes any variables or game state before the game starts.
/// </summary>
public void Awake ()
{
// Get joystick control
DFControl = GetComponent<dfControl> ();
// Get GUI manager
DFGUIManager = DFControl.GetManager ();
// Choose input handler
#if UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY
CurrentInputHandler = TouchInputHandler;
#endif
#if UNITY_EDITOR || UNITY_WEBPLAYER || UNITY_STANDALONE
CurrentInputHandler = MouseInputHandler;
#endif
if (IsRemoteTesting) {
CurrentInputHandler = TouchInputHandler;
}
}