BBGamelib.CCSprite.initWithSpriteFrame C# (CSharp) Method

initWithSpriteFrame() public method

public initWithSpriteFrame ( CCSpriteFrame spriteFrame ) : void
spriteFrame CCSpriteFrame
return void
		public void initWithSpriteFrame(CCSpriteFrame spriteFrame){

			// shader program
//			self.shaderProgram = [[CCShaderCache sharedShaderCache] programForKey:kCCShader_PositionTextureColor];
			
//			_dirty = _recursiveDirty = false;
			
			_opacityModifyRGB = true;
			
//			_blendFunc.src = CC_BLEND_SRC;
//			_blendFunc.dst = CC_BLEND_DST;
			
			_flipY = _flipX = false;
			
			// default transform anchor: center
			_anchorPoint =  new Vector2(0.5f, 0.5f);
			
			// zwoptex default values
//			_offsetPosition = CGPointZero;
			
//			_hasChildren = false;
//			_batchNode = null;
			
			// clean the Quad
//			bzero(&_quad, sizeof(_quad));
			
			// Atlas: Color
//			ccColor4B tmpColor = {255,255,255,255};
//			_quad.bl.colors = tmpColor;
//			_quad.br.colors = tmpColor;
//			_quad.tl.colors = tmpColor;
//			_quad.tr.colors = tmpColor;
			_quadColor = new Color32 (255, 255, 255, 255);


			this.displayedFrame = spriteFrame;
//			[self setTexture:texture];
//			[self setTextureRect:rect rotated:rotated untrimmedSize:rect.size];
			
			
			// by default use "Self Render".
			// if the sprite is added to a batchnode, then it will automatically switch to "batchnode Render"
//			[self setBatchNode:nil];
		}