Example #1
0
        protected override void LoadContent()
        {
            updates_Between_Run = 6;
            updates_Between_Burst = 3;
            updates_Between_Ball = 4;
            updatesBetweenFlicker = 2;

            run_sheet = content.Load<Texture2D>("Glub_Run_SpriteSheet");
            run_info = new SpriteSheetInfo(4, run_sheet.Width, run_sheet.Height, updates_Between_Run);

            ball_sheet = content.Load<Texture2D>("Glub_BallAnim_SpriteSheet");
            ball_info = new SpriteSheetInfo(5, ball_sheet.Width, ball_sheet.Height, updates_Between_Ball);

            catch_burst_sheet = content.Load<Texture2D>("Glub_Burst_SpriteSheet");
            burst_info = new SpriteSheetInfo(5, catch_burst_sheet.Width, catch_burst_sheet.Height, updates_Between_Burst);

            spriteTexture = run_sheet;
            spriteSheetFramesWide = run_info.totalFrames;

            border = this.lanko.border;

            maxBounces = 3;
            maxBouncesAfterFalling = 6;

            maxTimeAllowedBuffed = 10;         

            Scale = .13f;
            burst_scale = .18f;
            groundSpeed = 200f;
            airSpeed = 750f;
            seekSpeed = 500f;
            buffSpeed = 900;

            Speed = groundSpeed;

            UpdateHitbox();
                
            Direction = new Vector2(0, 0);

            this.center = new Vector2(Location.X + this.Hitbox.Width / 2, Location.Y + this.Hitbox.Height / 2);

            WithLanko = true;
            HasStrongBuff = false;

            SetTranformAndRect();
            this.SourceRectangle = run_info.sourceFrame;

            base.LoadContent();
        }
Example #2
0
        public MonoGameLanko(Game game) : base (game)
        {
            gcLanko = new GameConsoleLanko((GameConsole)game.Services.GetService<IGameConsole>());
     
            this.border = new LevelBorder(game);
            game.Components.Add(border);

            this.glub = new MonoGameGlub(game);
            this.glub.lanko = this;
            game.Components.Add(glub);

            this.observers = new List<ILankoObserver>();
            this.Attach(glub);

            this.controller = new InputController(game);

            ThrowSound = content.Load<SoundEffect>("glub_throw2");
        }