mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-12 14:51:51 +09:00
player now walks again, still stick to wall if key is kept down, but gravity is no longer accumulated (because the walking velocity is now separated)
Former-commit-id: f9394abe6230a4e60f2f7a42e81f7e85264a60c5 Former-commit-id: 1cd5b78c5800aef082d5eeec13a0a0a50ccea35b
This commit is contained in:
@@ -542,12 +542,18 @@ class Vector2 {
|
||||
*/
|
||||
operator fun not() = negate()
|
||||
|
||||
/**
|
||||
* Negates this [Vector2].
|
||||
* @return [Vector2] this vector
|
||||
*/
|
||||
operator fun unaryMinus() = negate()
|
||||
|
||||
/**
|
||||
* Negates this [Vector2].
|
||||
* @return [Vector2] this vector
|
||||
*/
|
||||
fun negate(): Vector2 {
|
||||
return Vector2(x * -1.0, y * -1.0)
|
||||
return Vector2(-x, -y)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user