canals elevator
This commit is contained in:
@@ -1078,3 +1078,32 @@
|
||||
"classname" "cash_spawn"
|
||||
"origin" "1640 5288 152"
|
||||
}
|
||||
// entity 33
|
||||
{
|
||||
"classname" "platform_target"
|
||||
"origin" "1224 6888 -264"
|
||||
"targetname" "elevator_01_target"
|
||||
}
|
||||
// entity 34
|
||||
{
|
||||
"classname" "platform"
|
||||
"target" "elevator_01_target"
|
||||
// brush 0
|
||||
{
|
||||
( 864 6976 -2720 ) ( 864 6977 -2720 ) ( 864 6976 -2719 ) canals [ 0 -1 0 0 ] [ 0 0 -1 -96 ] 90 1 1
|
||||
( 832 6592 -2720 ) ( 832 6592 -2719 ) ( 833 6592 -2720 ) canals [ 1 0 0 0 ] [ 0 0 -1 -96 ] 90 1 1
|
||||
( 832 6976 -2720 ) ( 833 6976 -2720 ) ( 832 6977 -2720 ) canals [ -1 0 0 0 ] [ 0 -1 0 0 ] 90 1 1
|
||||
( 1472 7168 -1408 ) ( 1472 7169 -1408 ) ( 1473 7168 -1408 ) canals [ 1 0 0 0 ] [ 0 -1 0 0 ] 90 1 1
|
||||
( 1472 7168 -2656 ) ( 1473 7168 -2656 ) ( 1472 7168 -2655 ) canals [ -1 0 0 0 ] [ 0 0 -1 -96 ] 90 1 1
|
||||
( 1472 7168 -2656 ) ( 1472 7168 -2655 ) ( 1472 7169 -2656 ) canals [ 0 1 0 0 ] [ 0 0 -1 -96 ] 90 1 1
|
||||
}
|
||||
// brush 1
|
||||
{
|
||||
( 1120 6848 -1408 ) ( 1120 6849 -1408 ) ( 1120 6848 -1407 ) origin [ 0 -1 0 0 ] [ 0 0 -1 0 ] 270 1 1
|
||||
( 1120 6848 -1408 ) ( 1120 6848 -1407 ) ( 1121 6848 -1408 ) origin [ 1 0 0 0 ] [ 0 0 -1 0 ] 270 1 1
|
||||
( 1120 6848 -1408 ) ( 1121 6848 -1408 ) ( 1120 6849 -1408 ) origin [ -1 0 0 0 ] [ 0 -1 0 0 ] 270 1 1
|
||||
( 1184 6912 -1376 ) ( 1184 6913 -1376 ) ( 1185 6912 -1376 ) origin [ 1 0 0 0 ] [ 0 -1 0 0 ] 270 1 1
|
||||
( 1184 6912 -1376 ) ( 1185 6912 -1376 ) ( 1184 6912 -1375 ) origin [ -1 0 0 0 ] [ 0 0 -1 0 ] 270 1 1
|
||||
( 1184 6912 -1376 ) ( 1184 6912 -1375 ) ( 1184 6913 -1376 ) origin [ 0 1 0 0 ] [ 0 0 -1 0 ] 270 1 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ fn init(
|
||||
continue;
|
||||
};
|
||||
|
||||
let target = Vec3::new(transform.translation.x, target.y, transform.translation.z);
|
||||
let platform = ActivePlatform {
|
||||
start: transform.translation,
|
||||
target,
|
||||
@@ -42,7 +43,7 @@ fn init(
|
||||
|
||||
fn move_active(time: Res<Time>, mut platforms: Query<(&mut Transform, &mut ActivePlatform)>) {
|
||||
for (mut transform, active) in platforms.iter_mut() {
|
||||
let t = (sin(time.elapsed_secs() * 0.5) + 1.) / 2.;
|
||||
let t = (sin(time.elapsed_secs() * 0.4) + 1.) / 2.;
|
||||
|
||||
transform.translation = active.start.lerp(active.target, t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user