Beispiel #1
0
    // Sets the state element info of the control
    // (texture and transition).
    //public abstract void SetStateElementInfo(int stateNum, ASCSEInfo info);


    //---------------------------------------------------
    // Edit-time updating stuff
    //---------------------------------------------------

    // Ensures that the control is updated in the scene view
    // while editing:
    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 AutoSpriteControlBaseMirror();
            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
        }
    }
	// Sets the state element info of the control
	// (texture and transition).
	//public abstract void SetStateElementInfo(int stateNum, ASCSEInfo info);


	//---------------------------------------------------
	// Edit-time updating stuff
	//---------------------------------------------------

	// Ensures that the control is updated in the scene view
	// while editing:
	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 AutoSpriteControlBaseMirror();
			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
		}
	}