Exemple #1
0
 public void UpdateRenderDirectionWithPlayerPosY(bool IsInvert = false)
 {
     IsFacingRight = Physics2D.IsRight(tf.position, Player.tf.position);
     Render.ChangeDirectionY(IsFacingRight, tf, IsInvert);
 }
Exemple #2
0
 public void UpdateRenderDirectionWithPlayerPosByFlip(bool IsInvert = false)
 {
     IsFacingRight = Physics2D.IsRight(tf.position, Player.tf.position);
     Render.ChangeDirectionXWithSpriteRender(IsInvert?!IsFacingRight : IsFacingRight, renderer);
 }