Example #1
0
 private void EnterSlide()
 {
     PolyDebug.Log("Started Enter Slide");
     Position.Y   += 10;
     playerTexture = playerTextureSlide;
     this.Collider = new Hitbox((float)20.0f, (float)10.0f, 0.0f, 0.0f);
 }
Example #2
0
 public void ReflectState(Entity from, int index, string name)
 {
     updates[index]    = (Func <int>)PolyDebug.GetMethod <Func <int> >(from, name + "Update");
     begins[index]     = (Action)PolyDebug.GetMethod <Action>(from, name + "Begin");
     ends[index]       = (Action)PolyDebug.GetMethod <Action>(from, name + "End");
     coroutines[index] = (Func <IEnumerator>)PolyDebug.GetMethod <Func <IEnumerator> >(from, name + "Coroutine");
 }
Example #3
0
 public void LogState(int index)
 {
     PolyDebug.Log("State " + index + ": "
                   + (updates[index] != null ? "U" : "")
                   + (begins[index] != null ? "B" : "")
                   + (ends[index] != null ? "E" : "")
                   + (coroutines[index] != null ? "C" : ""));
 }
Example #4
0
        public override void Update()
        {
            ChangedStates = false;

            if (updates[state] != null)
            {
                State = updates[state]();
            }
            if (currentCoroutine.Active == true)
            {
                currentCoroutine.Update();
                if (ChangedStates != false && currentCoroutine.Finished == true)
                {
                    PolyDebug.Log("Coroutine " + state + " finished");
                }
            }
        }
Example #5
0
        public override void LoadContent()
        {
            if (content == null)
            {
                content = new ContentManager(ScreenManager.Game.Services, "Content");
            }

            spriteBatch = new SpriteBatch(ScreenManager.GraphicsDevice);

            tileMap = content.Load <TileMap>(String.Format("Maps/Zone{0}/{1}", currentZone, currentLevel));

            backgroundImage1     = content.Load <Texture2D>("bg_background2");
            backgroundImage2     = content.Load <Texture2D>("cityBackground");
            backgroundImageCloud = content.Load <Texture2D>("backgroundCloud");


            PolyDebug.LoadContent(ScreenManager.GraphicsDevice);

            // Load the level.
            level = new Level(content, tileMap, camera);

            base.LoadContent();
        }
Example #6
0
 private void LeaveWhack()
 {
     PolyDebug.Log("Started Leave Whack");
 }
Example #7
0
 private void EnterWhack()
 {
     PolyDebug.Log("Started Enter Whack");
 }
Example #8
0
 private void EnterWallJump()
 {
     PolyDebug.Log("Started Enter Wall Jump");
 }
Example #9
0
 private void EnterWallClimb()
 {
     PolyDebug.Log("Started Enter Wall Climb");
     endPositionClimb = Position.Y - endPositionOffSet;
 }
Example #10
0
 private void EnterNormal()
 {
     PolyDebug.Log("Started Enter Normal");
 }