box_shake on box hole
This commit is contained in:
parent
deece71de8
commit
480506b715
3 changed files with 11 additions and 3 deletions
|
@ -2,8 +2,8 @@
|
|||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.dofdev.snake"
|
||||
android:versionCode="29"
|
||||
android:versionName="1.32"
|
||||
android:versionCode="31"
|
||||
android:versionName="1.34"
|
||||
android:installLocation="auto"
|
||||
>
|
||||
<uses-sdk android:minSdkVersion="29" android:targetSdkVersion="32" />
|
||||
|
|
|
@ -15,6 +15,8 @@ static class Arts
|
|||
static Material mat_justcolor = new Material("justcolor.hlsl");
|
||||
|
||||
static Tex tex_box = Tex.FromFile("paper.jpg");
|
||||
|
||||
public static Vec3 box_shake = new(0, 0, 0);
|
||||
static Quat food_ori = Quat.Identity;
|
||||
|
||||
static XYZi last_headpos = new(0, 0, 0);
|
||||
|
@ -71,9 +73,14 @@ static class Arts
|
|||
);
|
||||
|
||||
// box
|
||||
box_shake = Vec3.Lerp(box_shake, Vec3.Zero, Time.Stepf / 0.333f);
|
||||
// scale in
|
||||
float box_scale = Mono.box_scale; // Maths.min(Maths.smooth_stop(Maths.u_scalar(Time.Totalf - 3)) * Mono.box_scale, Mono.box_scale);
|
||||
Hierarchy.Push(Mono.box_pose.ToMatrix(box_scale));
|
||||
Hierarchy.Push(Matrix.TRS(
|
||||
Mono.box_pose.position + (box_shake * U.cm * 0.333f),
|
||||
Mono.box_pose.orientation,
|
||||
box_scale
|
||||
));
|
||||
// meshes["InsideOut"].Draw(mat_unlit, Matrix.Identity);
|
||||
meshes["InsideOut"].Draw(
|
||||
mat_box,
|
||||
|
|
|
@ -176,6 +176,7 @@ static class Mono
|
|||
{
|
||||
holes.Add(snake[0], snake_dir);
|
||||
SFX.punch_through.PlayBox(snake[0]);
|
||||
Arts.box_shake += snake_dir.ToVec3;
|
||||
}
|
||||
if (holes.ContainsKey(snake[snake_len - 1]))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue