本文整理汇总了C#中Sprite.visible方法的典型用法代码示例。如果您正苦于以下问题:C# Sprite.visible方法的具体用法?C# Sprite.visible怎么用?C# Sprite.visible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sprite
的用法示例。
在下文中一共展示了Sprite.visible方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadAssets
public override void LoadAssets()
{
mouthLeft = resourceFactory.Create(this, "MouthLeft-WeNeedThisTaste").GetComponent<Sprite>();
mouthRight = resourceFactory.Create(this, "MouthRight-WeNeedThisTaste").GetComponent<Sprite>();
mouthLeft.visible(false);
mouthRight.visible(false);
}
示例2: LoadAssets
public override void LoadAssets()
{
background.LoadAssets();
topHand = Sprite.create(this, "top_hand");
bottomPalm = Sprite.create(this, "hand_base_top");
bottomWrist = Sprite.create(this, "hand_base_bottom");
bottomHandFingers = Sprite.create(this, "bottom_hand_fingers");
indexClosed = Sprite.create(this, "index_closed");
indexOpen = Sprite.create(this, "index_open");
middleFingerOpen = Sprite.create(this, "middle_finger_open");
otherFingerOpen = Sprite.create(this, "other_finger_open");
littleFingerOpen = Sprite.create(this, "little_finger_open");
thumbOpen = Sprite.create(this, "thumb_open");
topHand.visible(false);
bottomPalm.visible(false);
bottomWrist.visible(false);
bottomHandFingers.visible(false);
indexClosed.visible(false);
indexOpen.visible(false);
middleFingerOpen.visible(false);
otherFingerOpen.visible(false);
littleFingerOpen.visible(false);
thumbOpen.visible(false);
// second part of the scene: zoomed out
fallingGuyProp.LoadAssets();
}
示例3: Setup
public override void Setup(float startTime)
{
background = FullScreenQuad.create(this, "bg");
title = Sprite.create(this, new[] {"tmo1", "tmo2", "tmo3", "tmo4", "tmo5", "tmo6"});
subtitle = Sprite.create(this, new[] {"p1", "p2", "p3", "p4", "p5", "p6"});
news = Sprite.create(this, new[] {"news1", "news2"});
buyMusic = Sprite.create(this, new[] {"itunes1", "itunes2"});
startButton = Sprite.create(this, new[] {"tap1", "tap2", "tap3"});
Camera cam = Camera.main;
var layoutpos = cam.ViewportToWorldPoint(new Vector3(0.5f, 0.65f, 0.0f));
layoutpos -= title.Center();
// Programmer needs swizzling, badly.
title.transform.position = new Vector3(layoutpos.x, layoutpos.y, title.transform.position.z);
// Anchor the subtitle an absolute distance from wherever the title ended up
subtitle.transform.position = title.transform.position + title.Center() + new Vector3(15f, -20f, -1f);
// add blinking start text below title but don't display it yet
startButton.setCenterToViewportCoord(0.5f, 0.4f);
startButton.visible(false);
// place buttons in the bottom corners
news.setScreenPosition(4, 4);
buyMusic.setScreenPosition((int) Screen.width - buyMusic.PixelWidth() - 4, 4);
// animate title
cycle_title = new Cycler(0.4f, 5);
cycle_title.AddSprite(title);
cycle_title.AddSprite(subtitle);
}
示例4: Setup
public override void Setup(float startTime)
{
background = spriteRenderer.add(new FullScreenQuad(), this.GetType(), new[] {"bg"});
title = spriteRenderer.add(new Sprite(), this.GetType(), new[] {"tmo1", "tmo2", "tmo3", "tmo4", "tmo5", "tmo6"});
subtitle = spriteRenderer.add(new Sprite(), this.GetType(), new[] {"p1", "p2", "p3", "p4", "p5", "p6"});
news = spriteRenderer.add(new Sprite(), this.GetType(), new[] {"news1", "news2"});
buyMusic = spriteRenderer.add(new Sprite(), this.GetType(), new[] {"itunes1", "itunes2"});
startButton = spriteRenderer.add(new Sprite(), this.GetType(), new[] {"tap1", "tap2", "tap3"});
Camera camera = Camera.main;
var layoutpos = camera.ViewportToWorldPoint(new Vector3(0.5f, 0.65f, 0));
layoutpos -= new Vector3(title.Center(), 0);
title.worldPosition = new Vector3(layoutpos.X, layoutpos.Y, title.worldPosition.Z);
// Anchor the subtitle an absolute distance from wherever the title ended up
subtitle.worldPosition = title.worldPosition + new Vector3(title.Center() , 0) + new Vector3(16f, 24f, -1f);
// add blinking start text below title but don't display it yet
startButton.setCenterToViewportCoord(0.5f, 0.4f);
startButton.visible(false);
// place buttons in the bottom corners
news.screenPosition = new Vector3(4, camera.pixelHeight - news.height - 4, 0);
buyMusic.screenPosition = new Vector3(camera.pixelWidth - buyMusic.PixelWidth() - 4, camera.pixelHeight - buyMusic.height - 4, 0);
// animate title
cycle_title = new Cycler(0.4f, 5);
cycle_title.AddSprite(title);
cycle_title.AddSprite(subtitle);
}
示例5: addMouth
private void addMouth()
{
leftMouth = resourceFactory.Create(this, "LeftMouth").GetComponent<Sprite>();
rightMouth = resourceFactory.Create(this, "RightMouth").GetComponent<Sprite>();
leftMouth.visible(false);
rightMouth.visible(false);
leftMouth.setWorldPosition(-19f, 25f, -4f);
rightMouth.setWorldPosition(22.5f, 24f, -4f);
}
示例6: SpeechBubble
public SpeechBubble(Camera camera, float leftToRightSwitchOverPosition)
{
this.camera = camera;
this.leftToRightSwitchOverPosition = leftToRightSwitchOverPosition;
speechBubble = Sprite.create("SceneFour/bubble");
speechBubbleLeft = Sprite.create("SceneFour/bubble_1");
speechBubbleRight = Sprite.create("SceneFour/bubble_2");
speechBubbleRight.visible(false);
speechBubble.setWorldPosition(-80f, 60f, -1f);
speechBubbleLeft.setWorldPosition(-55f, 50f, -5f);
speechBubbleRight.setWorldPosition(-55f, 50f, -5f);
speechBubbleRight.transform.Rotate(Vector3.forward * 5);
input = new UnityInput();
dragger = new Dragger(input, speechBubble);
}
示例7: moveMouth
private void moveMouth(Sprite mouth, int start, int end)
{
// combinations of nextTexture and activating/deactivating the mouth overlays
if (frame == start) {
mouth.visible(true);
}
else if(frame > start && frame < end) {
mouth.DrawNextFrame();
}
else if(frame == end) {
mouth.DrawNextFrame();
mouth.visible(false);
}
}
示例8: buildMessageBackground
void buildMessageBackground()
{
messageBackground = spriteRenderer.add(new Sprite(), "1px");
messageBackground.visible(false);
messageBackground.setDepth(-8.75f);
}
示例9: buildMessageBackground
void buildMessageBackground()
{
messageBackground = Sprite.create((Texture2D) Resources.Load("1px"));
messageBackground.visible(false);
messageBackground.name = "message background";
messageBackground.transform.position = new Vector3(0f, 0f, -9f);
}
示例10: LoadAssets
public void LoadAssets()
{
guyWithArmOut = Sprite.create("SceneTwelve/guy_armout");
otherArm = Sprite.create("SceneTwelve/other_arm");
guyWithArmOut.visible(false);
otherArm.visible(false);
guyWithFist = Sprite.create("SceneTwelve/guy_armout_fist");
otherFist = Sprite.create("SceneTwelve/other_arm_fist");
guyWithFist.visible(false);
otherFist.visible(false);
}