本文整理汇总了C#中CCVector2类的典型用法代码示例。如果您正苦于以下问题:C#CCVector2类的具体用法?C#CCVector2怎么用?C#CCVector2使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:GetFontAtlasSpriteFont
publicstaticCCFontAtlasGetFontAtlasSpriteFont(stringfontFileName,floatfontSize,CCVector2imageOffset=default(CCVector2))
{
stringatlasName=GenerateFontName(fontFileName,(int)fontSize,GlyphCollection.Custom,false);
varatlasAlreadyExists=atlasMap.ContainsKey(atlasName);
if(!atlasAlreadyExists)
{
varfont=newCCFontSpriteFont(fontFileName,fontSize,imageOffset);
if(font!=null)
{
vartempAtlas=font.CreateFontAtlas();
if(tempAtlas!=null)
{
atlasMap[atlasName]=tempAtlas;
returnatlasMap[atlasName];
}
}
}
else
{
returnatlasMap[atlasName];
}
returnnull;
}
原文链接:
http://www.jxszl.com/biancheng/C/556698.html