Beispiel #1
0
    // Resets all sprite values to defaults for reuse:
    public void Clear()
    {
        client      = null;
        billboarded = false;
        hidden      = false;
        SetColor(Color.white);
        offset = Vector3.zero;

        PauseAnim();
        animations.Clear();
        curAnim = null;
        animCompleteDelegate = null;
    }
Beispiel #2
0
    //-----------------------------------------------------------------
    // Animation-related routines:
    //-----------------------------------------------------------------

    // Sets the delegate to be called upon animation completion:
    public void SetAnimCompleteDelegate(AnimCompleteDelegate del)
    {
        animCompleteDelegate = del;
    }
Beispiel #3
0
/*
	/// <summary>
	/// Allows you to setup some of the main features of a sprite in a single method call.
	/// </summary>
	/// <param name="width">Width of the sprite in world space.</param>
	/// <param name="height">Height of the sprite in world space.</param>
	/// <param name="lowerleftPixel">Lower-left pixel of the sprite when no animation has been played.</param>
	/// <param name="pixeldimensions">Pixel dimeinsions of the sprite when no animation has been played.</param>
	public virtual void Setup(float width, float height, Vector2 lowerleftPixel, Vector2 pixeldimensions)
	{
		SetSize(width, height);
		lowerLeftPixel = lowerleftPixel;
		pixelDimensions = pixeldimensions;

		tempUV = PixelCoordToUVCoord(lowerLeftPixel);
		uvRect.x = tempUV.x;
		uvRect.y = tempUV.y;

		tempUV = PixelSpaceToUVSpace(pixelDimensions);
		uvRect.xMax = uvRect.x + tempUV.x;
		uvRect.yMax = uvRect.y + tempUV.y;

		SetBleedCompensation(bleedCompensation);
	}
*/


	//-----------------------------------------------------------------
	// Animation-related routines:
	//-----------------------------------------------------------------

	/// <summary>
	/// Sets the delegate to be called upon animation completion.
	/// </summary>
	/// <param name="del">The delegate to be called when an animation finishes playing.</param>
	public void SetAnimCompleteDelegate(AnimCompleteDelegate del)
	{
		animCompleteDelegate = del;
	}
Beispiel #4
0
	/// <summary>
	/// Resets important sprite values to defaults for reuse.
	/// </summary>
	public override void Clear()
	{
		base.Clear();

		//animations.Clear();
		animCompleteDelegate = null;
	}
Beispiel #5
0
    // Resets all sprite values to defaults for reuse:
    public void Clear()
    {
        client = null;
        billboarded = false;
        hidden = false;
        SetColor(Color.white);
        offset = Vector3.zero;

        PauseAnim();
        animations.Clear();
        curAnim = null;
        animCompleteDelegate = null;
    }
Beispiel #6
0
 // Sets the delegate to be called upon animation completion:
 public void SetAnimCompleteDelegate(AnimCompleteDelegate del)
 {
     isPlaying            = "";
     animCompleteDelegate = del;
 }