mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-16 22:16:55 +07:00
Internal folder for utils
This commit is contained in:
@@ -26,16 +26,24 @@ namespace IsoTools.Examples {
|
||||
|
||||
void Update () {
|
||||
if ( Input.GetKey(KeyCode.LeftArrow) ) {
|
||||
_isoRigidbody.velocity = IsoUtils.Vec3ChangeX(_isoRigidbody.velocity, -speed);
|
||||
var velocity = _isoRigidbody.velocity;
|
||||
velocity.x = -speed;
|
||||
_isoRigidbody.velocity = velocity;
|
||||
}
|
||||
else if ( Input.GetKey(KeyCode.RightArrow) ) {
|
||||
_isoRigidbody.velocity = IsoUtils.Vec3ChangeX(_isoRigidbody.velocity, speed);
|
||||
var velocity = _isoRigidbody.velocity;
|
||||
velocity.x = speed;
|
||||
_isoRigidbody.velocity = velocity;
|
||||
}
|
||||
else if ( Input.GetKey(KeyCode.DownArrow) ) {
|
||||
_isoRigidbody.velocity = IsoUtils.Vec3ChangeY(_isoRigidbody.velocity, -speed);
|
||||
var velocity = _isoRigidbody.velocity;
|
||||
velocity.y = -speed;
|
||||
_isoRigidbody.velocity = velocity;
|
||||
}
|
||||
else if ( Input.GetKey(KeyCode.UpArrow) ) {
|
||||
_isoRigidbody.velocity = IsoUtils.Vec3ChangeY(_isoRigidbody.velocity, speed);
|
||||
var velocity = _isoRigidbody.velocity;
|
||||
velocity.y = speed;
|
||||
_isoRigidbody.velocity = velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user