public static CCTexture2D GetCCTexture2DWithFile(String p_ContentFileName) { CCTexture2D cctext2D = new CCTexture2D(); cctext2D.initWithTexture(CCApplication.sharedApplication().content.Load <Texture2D>(p_ContentFileName)); return(cctext2D); }
public static CCTexture2D GetCCTexture2D(Word p_Word) { CCTexture2D result = new CCTexture2D(); result.initWithTexture(GetTexture2D(p_Word)); return(result); }
public Selection(Word p_StudyInfo, bool p_IsAnswer, Int32 p_Width, Int32 p_Height) { base.init(); this.StudyInfo = p_StudyInfo; CCTexture2D texture = new CCTexture2D(); texture.initWithTexture(PictureManager.GetTexture2D(p_StudyInfo)); if (p_Width < texture.ContentSizeInPixels.width) { this.scaleX = p_Width / texture.ContentSizeInPixels.width; } if (p_Height < texture.ContentSizeInPixels.height) { this.scaleY = p_Height / texture.ContentSizeInPixels.height; } this.contentSize.width = p_Width; this.contentSize.height = p_Height; CCRect rect = new CCRect(); rect.size = new CCSize(texture.ContentSizeInPixels.width, texture.ContentSizeInPixels.height); this.initWithTexture(texture, rect); this.IsAnswer = p_IsAnswer; LoadResultPeople(); }
public static CCTexture2D GetCCTexture2D(Stream p_PicStrean, Int32 p_Width, Int32 p_Height, bool p_Zoom) { Texture2D text2D = Texture2D.FromStream(CCApplication.sharedApplication().GraphicsDevice, p_PicStrean, p_Width, p_Height, p_Zoom); CCTexture2D cctext2D = new CCTexture2D(); cctext2D.initWithTexture(text2D); return(cctext2D); }
public static CCTexture2D GetCCTexture2D(String p_FilePath) { Texture2D text2D = Media.PictureManager.GetTexture2D(p_FilePath); CCTexture2D cctext2D = new CCTexture2D(); cctext2D.initWithTexture(text2D); return(cctext2D); }
public static CCTexture2D GetCCTexture2D(Word p_Word, Int32 p_Width, Int32 p_Height, bool p_Zoom) { Texture2D text2D = GetTexture2D(p_Word, p_Width, p_Height, p_Zoom); CCTexture2D cctext2D = new CCTexture2D(); cctext2D.initWithTexture(text2D); return(cctext2D); }
public static CCTexture2D GetCCTexture2D(Stream p_PicStrean) { Texture2D text2D = Texture2D.FromStream(CCApplication.sharedApplication().GraphicsDevice, p_PicStrean); CCTexture2D cctext2D = new CCTexture2D(); cctext2D.initWithTexture(text2D); return(cctext2D); }
public static CCTexture2D GetCCTexture2D(Word p_Word, Int32 p_Width, Int32 p_Height, bool p_Zoom) { CCTexture2D result = new CCTexture2D(); result.initWithTexture(GetTexture2D(p_Word), new CCSize(p_Width, p_Height)); return(result); }