Esempio n. 1
0
        /// <summary>
        /// Load all graphic and audio content (this game has no audio).
        /// </summary>
        protected override void LoadContent()
        {
            // General view content
            canvas.LoadContent(content);

            Texture2D spritejump     = canvas.GetTexture("spritejump");
            Texture2D spritestanding = canvas.GetTexture("standing");
            Texture2D spritefalling  = canvas.GetTexture("spritefall");
            Texture2D spritewalking  = canvas.GetTexture("walkfstrip");

            seamstress.ActivatePhysics(world, spritestanding, spritejump, spritefalling, spritewalking, scale);

            background = canvas.GetTexture("backgrounds/bluemt");

            //ribbon.ActivatePhysics(world, scale);

            boxtext          = canvas.GetTexture("64x64platform");
            spool_tex        = canvas.GetTexture("64x64thimbs");
            tallbox_tex      = canvas.GetTexture("64x128platform");
            saverock         = canvas.GetTexture("saverock");
            shortflatbox_tex = canvas.GetTexture("128x32platform");
            tallflatbox_tex  = canvas.GetTexture("128x64platform");
            glasshook_tex    = canvas.GetTexture("64x128hookglass");

            ribbon = new CoolRibbonObject(world, boxtext);
            objects.Add(ribbon);
            ribbonController = new CoolRibbonController(ribbon);
            world.AddController(ribbonController);

            inputController = new MainInputController(seamstress, ribbon);

            MakeLevel();
        }
Esempio n. 2
0
 public CoolRibbonController(CoolRibbonObject r) : base(ControllerType.AbstractForceController)
 {
     ribbon = r;
 }
 /// <summary>
 /// Creates a new input controller.
 /// </summary>
 public MainInputController(SeamstressObject seamstress, CoolRibbonObject ribbon)
 {
     this.seamstress = seamstress;
     this.ribbon     = ribbon;
 }
 public CoolRibbonController(CoolRibbonObject r)
     : base(ControllerType.AbstractForceController)
 {
     ribbon = r;
 }
        private bool sIsJumping; // seamstress is jumping?

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Creates a new input controller.
        /// </summary>
        public MainInputController(SeamstressObject seamstress, CoolRibbonObject ribbon)
        {
            this.seamstress = seamstress;
            this.ribbon = ribbon;
        }
Esempio n. 6
0
        /// <summary>
        /// Load all graphic and audio content (this game has no audio).
        /// </summary>
        protected override void LoadContent()
        {
            // General view content
                canvas.LoadContent(content);

                Texture2D spritejump = canvas.GetTexture("spritejump");
                Texture2D spritestanding = canvas.GetTexture("standing");
                Texture2D spritefalling = canvas.GetTexture("spritefall");
                Texture2D spritewalking = canvas.GetTexture("walkfstrip");
                seamstress.ActivatePhysics(world, spritestanding, spritejump, spritefalling, spritewalking, scale);

                background = canvas.GetTexture("backgrounds/bluemt");

                //ribbon.ActivatePhysics(world, scale);

                boxtext = canvas.GetTexture("64x64platform");
                spool_tex = canvas.GetTexture("64x64thimbs");
                tallbox_tex = canvas.GetTexture("64x128platform");
                saverock = canvas.GetTexture("saverock");
                shortflatbox_tex = canvas.GetTexture("128x32platform");
                tallflatbox_tex = canvas.GetTexture("128x64platform");
                glasshook_tex = canvas.GetTexture("64x128hookglass");

                ribbon = new CoolRibbonObject(world, boxtext);
                objects.Add(ribbon);
                ribbonController = new CoolRibbonController(ribbon);
                world.AddController(ribbonController);

                inputController = new MainInputController(seamstress, ribbon);

                MakeLevel();
        }