Jump to content
  • 0

How to make a player show attack frame while is moving?


Timty

Question

2 answers to this question

Recommended Posts

  • 0

You can go on the "UpdateSpriteAninmation" method in "Intersect.Client.Entities.Entity" and move the code block related to attacking before the one of moving. Something like the code below should work.

 

if (AttackTimer > Globals.System.GetTimeMs()) //Attacking
{
  ...
}
else if (IsMoving)
{
  ...
}

 

Link to comment
Share on other sites

  • 0

i think you all you have to do is to define:

            public bool IsAttacking

and include that in Client/Entity.cs/UpdateSpriteAnimation() here:

             if (IsMoving && !IsAttacking)

and set IsAttacking to true/false in Client/Player.cs/Update()

Link to comment
Share on other sites

×
×
  • Create New...