Ejemplo n.º 1
0
	// Removes the sprite with the specified managed mesh from the manager.
	public void RemoveSprite(SpriteMesh_Managed sprite)
	{
		vertices[sprite.mv1] = Vector3.zero;
		vertices[sprite.mv2] = Vector3.zero;
		vertices[sprite.mv3] = Vector3.zero;
		vertices[sprite.mv4] = Vector3.zero;

		// Remove the sprite from the billboarded list
		// since that list should only contain active
		// sprites:
/*
		if (sprite.billboarded)
			activeBillboards.Remove(sprite);
		else
*/
			activeBlocks.Remove(sprite);

		// Reset the bone:
		if (gameObject != null)
			bones[sprite.index] = transform;

		// Clean the sprite's settings:
		sprite.Clear();
		sprite.sprite.spriteMesh = null;
		sprite.sprite = null;

		availableBlocks.Add(sprite);

		vertsChanged = true;
	}
Ejemplo n.º 2
0
 public void RemoveSprite(SpriteMesh_Managed sprite)
 {
     this.vertices[sprite.mv1] = Vector3.zero;
     this.vertices[sprite.mv2] = Vector3.zero;
     this.vertices[sprite.mv3] = Vector3.zero;
     this.vertices[sprite.mv4] = Vector3.zero;
     this.activeBlocks.Remove(sprite);
     if (base.gameObject != null)
     {
         this.bones[sprite.index] = base.transform;
     }
     sprite.Clear();
     sprite.sprite.spriteMesh = null;
     sprite.sprite            = null;
     this.availableBlocks.Add(sprite);
     this.vertsChanged = true;
 }