Mirror() public method

public Mirror ( SpriteRoot, s ) : void
s SpriteRoot,
return void
コード例 #1
0
    public override void DoMirror()
    {
        // Only run if we're not playing:
        if (Application.isPlaying)
        {
            return;
        }

        // This means Awake() was recently called, meaning
        // we couldn't reliably get valid camera viewport
        // sizes, so we zeroed them out so we'd know to
        // get good values later on (when OnDrawGizmos()
        // is called):
        if (screenSize.x == 0 || screenSize.y == 0)
        {
            Start();
        }

        if (mirror == null)
        {
            mirror = new UITextFieldMirror();
            mirror.Mirror(this);
        }

        mirror.Validate(this);

        // Compare our mirrored settings to the current settings
        // to see if something was changed:
        if (mirror.DidChange(this))
        {
            Init();
            mirror.Mirror(this);                // Update the mirror
        }
    }
コード例 #2
0
	public override void DoMirror()
	{
		// Only run if we're not playing:
		if (Application.isPlaying)
			return;

		// This means Awake() was recently called, meaning
		// we couldn't reliably get valid camera viewport
		// sizes, so we zeroed them out so we'd know to
		// get good values later on (when OnDrawGizmos()
		// is called):
		if (screenSize.x == 0 || screenSize.y == 0)
			Start();

		if (mirror == null)
		{
			mirror = new UITextFieldMirror();
			mirror.Mirror(this);
		}

		mirror.Validate(this);

		// Compare our mirrored settings to the current settings
		// to see if something was changed:
		if (mirror.DidChange(this))
		{
			Init();
			mirror.Mirror(this);	// Update the mirror
		}
	}