Пример #1
0
 private void createSpriteInMiddleOfView()
 {
     Sprite sp = new Sprite();
     sp.Position = GameService.Instance.QueryModule<StageModule>().CurCamera.Focus;
     sp.Texture = new ReferTexture("Background");
     GameService.Instance.QueryModule<StageModule>().AddItem("Default", sp);
 }
Пример #2
0
        public void ShowEditor(AbstractComponent comp)
        {
            FAnim = comp.GetCompByType(typeof(FrameAnimator)) as FrameAnimator;
            Sprite = comp.GetCompByType(typeof(Sprite)) as Sprite;

            if (FAnim != null && Sprite != null)
            {
                this.Show();
            }
            else
            {
                FAnim = null;
                Sprite = null;
                MessageBox.Show("AnimEditor必要组件:FrameAnimator、Sprite");
            }
        }
Пример #3
0
 public void stageEditCtrl_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     Sprite sp = new Sprite();
     sp.Position = new Microsoft.Xna.Framework.Vector2(e.X, e.Y);
     sp.Texture = new ReferTexture(contextCtrl.imagePicker1.TexRefData.Key);
     GameService.Instance.QueryModule<StageModule>().AddItem("Default", sp);
 }