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