本文整理汇总了C#中Sprite.SetSizeXY方法的典型用法代码示例。如果您正苦于以下问题:C# Sprite.SetSizeXY方法的具体用法?C# Sprite.SetSizeXY怎么用?C# Sprite.SetSizeXY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sprite
的用法示例。
在下文中一共展示了Sprite.SetSizeXY方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start()
{
GameObject refObj = GameObject.Find( "SPM_Filter" );
Manager = (SpriteManager)refObj.GetComponent( typeof(SpriteManager) );
Filter = Manager.AddSprite( gameObject, 4,4,0,0,4,4, false );
Filter.offset = new Vector3(240.0f, -400.0f, 0);
Filter.SetDrawLayer( 5 );
Filter.SetSizeXY( 500, 820 );
Debug.Log("FilterOn");
}
示例2: setNumber
public static void setNumber(SpriteManager man, Sprite spr,int num , int count , bool draw)
{
//if( num < 10 )
{
int x = 0,y = 0;
if(draw)
{
x = num;
y = 0;
spr.SetSizeXY( WIDTH_NUM * GameManager.Instance.getScreenW(),
HEIGHT_NUM * GameManager.Instance.getScreenH() );
//time[i].SetSizeXY( time[i].width/2* GameManager.Instance.getScreenW()
//, time[i].height/2 * GameManager.Instance.getScreenH());
}else
{
spr.SetSizeXY( 0.0f ,0.0f );
}
spr.lowerLeftUV = man.PixelCoordToUVCoord( x * WIDTH_NUM , 0);
}
}
示例3: RemoveSprite
public void RemoveSprite(Sprite sprite)
{
sprite.SetSizeXY(0,0);
sprite.v1 = Vector3.zero;
sprite.v2 = Vector3.zero;
sprite.v3 = Vector3.zero;
sprite.v4 = Vector3.zero;
vertices[sprite.mv1] = sprite.v1;
vertices[sprite.mv2] = sprite.v2;
vertices[sprite.mv3] = sprite.v3;
vertices[sprite.mv4] = sprite.v4;
sprite.client = null;
availableBlocks.Add(sprite);
// 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);
sprite.billboarded = false;
vertsChanged = true;
}
示例4: Start
// Use this for initialization
void Start()
{
GameObject refObj = GameObject.Find("Filter_MNG");
Manager = (SpriteManager)refObj.GetComponent( typeof(SpriteManager));
Filter = Manager.AddSprite( gameObject , 4, 4, 0 , 0 , 4, 4, false );
Filter.offset = new Vector3( Screen.width / 2 , Screen.height / 2 , -2 );
Filter.SetDrawLayer( 5 );
Filter.SetSizeXY( Screen.width * 10, Screen.height * 10);
alphe = 0.0f;
Awake();
setAlphe();
//SOUND
if(type == TYPE_MENU)
{
GameObject seObj = (GameObject)Resources.Load("Sound/sound_se_Menu");
GameObject obj = (GameObject)Instantiate( seObj );
}
}