public override void initialize() { base.initialize(); sprite = base.sprite; textureSprite = sprite as motion.TextureSprite; timeVal = cape.TimeValue.forSeconds((long)1); }
public override void cleanup() { base.cleanup(); if (sprite != null) { sprite.removeFromContainer(); sprite = null; } layer = null; }
public override void initialize() { base.initialize(); if (layer == null) { layer = scene as motion.SpriteLayer; } if (layer != null) { sprite = createSprite(); } }
public bool nextFrame() { if (imageSheet == null || arraySize < 1) { sprite = null; return(false); } currentFrame++; if (currentFrame >= arraySize) { currentFrame = 0; } if (textureSprite != null) { textureSprite.setTexture(imageSheet[currentFrame]); } return(true); }
public virtual void removeSprite(motion.Sprite sprite) { layer.removeSprite(sprite); }