本文整理汇总了C#中Texture.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Texture.Show方法的具体用法?C# Texture.Show怎么用?C# Texture.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Texture
的用法示例。
在下文中一共展示了Texture.Show方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
public static void Main(string[] args)
{
Application.Init ();
Stage stage = Stage.Default as Stage;
(stage as Stage).KeyPressEvent += delegate {
Clutter.Main.Quit();
};
// fixme: add constructor
Clutter.Color stage_color = new Clutter.Color (0xcc, 0xcc, 0xcc, 0xff);
stage.SetColor (stage_color);
Clutter.Group group = new Group();
stage.Add (group);
group.Show ();
// Make a hand
Clutter.Actor hand = new Texture ("redhand.png");
hand.SetPosition (0,0);
hand.Show ();
// Make a rect
Clutter.Rectangle rect = new Clutter.Rectangle();
rect.SetPosition (0,0);
rect.SetSize ((int)hand.Width, (int)hand.Height);
Clutter.Color rect_bg_color = new Clutter.Color (0x33, 0x22, 0x22, 0xff);
rect.SetColor (rect_bg_color);
rect.BorderWidth = 10;
rect.Show ();
group.Add (rect);
group.Add (hand);
// Make a timeline
Timeline timeline = new Timeline (100, 26);
timeline.Loop = true;
Alpha alpha = new Alpha (timeline, (a) => a.Value);
Behaviour o_behave = new BehaviourOpacity (alpha, 0x33, 0xff);
o_behave.Apply (group);
// Make a path behaviour and apply that too
Behaviour p_behave = new BehaviourPath(alpha, knots); // fixme: add custom constructor?
p_behave.Apply (group);
// start timeline
timeline.Start ();
stage.ShowAll();
// launch
Application.Run ();
}