show the dof
This commit is contained in:
parent
900e950aa4
commit
b53cb6dd6c
33 changed files with 1837 additions and 210 deletions
BIN
Assets/Audio/Music/aloe for your snake bite.ogg
(Stored with Git LFS)
BIN
Assets/Audio/Music/aloe for your snake bite.ogg
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/Audio/Music/no intro aloe for your snake bite.ogg
(Stored with Git LFS)
BIN
Assets/Audio/Music/no intro aloe for your snake bite.ogg
(Stored with Git LFS)
Binary file not shown.
|
@ -12,10 +12,11 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b37f4483e8f4f3047b5e67b5118cb74d, type: 3}
|
||||
m_Name: Design
|
||||
m_EditorClassIdentifier:
|
||||
headOffset: {x: 0, y: 2, z: -22}
|
||||
headOffset: {x: 0, y: 0, z: -22}
|
||||
pivotPos: {x: 0, y: 2.8, z: 0}
|
||||
scale: 60
|
||||
bounds: {x: 4, y: 3, z: 4}
|
||||
bounds: {x: 3, y: 2, z: 3}
|
||||
foodValue: 6
|
||||
aiIQ: 0.05
|
||||
aiIQ: 0.01
|
||||
aiMaxChances: 12
|
||||
boxSpring: 13
|
||||
|
|
|
@ -14,12 +14,16 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
foodMesh: {fileID: 4300006, guid: 1cc1b125262248c4ba967763bf40c861, type: 3}
|
||||
arrowMesh: {fileID: 4300000, guid: 1cc1b125262248c4ba967763bf40c861, type: 3}
|
||||
tongueMesh: {fileID: 4300088, guid: 1cc1b125262248c4ba967763bf40c861, type: 3}
|
||||
bodyMesh: {fileID: 4300004, guid: 1cc1b125262248c4ba967763bf40c861, type: 3}
|
||||
coreMesh: {fileID: 4300070, guid: 1cc1b125262248c4ba967763bf40c861, type: 3}
|
||||
snakeMat: {fileID: 2100000, guid: c1765b22e6a92834ca4c29d79bcfe253, type: 2}
|
||||
unlitMat: {fileID: 2100000, guid: bb5f41eecb5ccc546814746a66914984, type: 2}
|
||||
wetMat: {fileID: 2100000, guid: d584c93390323c84cbdb0665a4a3721a, type: 2}
|
||||
faceMesh: {fileID: 4300030, guid: 1cc1b125262248c4ba967763bf40c861, type: 3}
|
||||
controllerMesh: {fileID: 4300000, guid: cb69a79fa4024c943846e5fefb4d90b4, type: 3}
|
||||
joystickMesh: {fileID: 4300000, guid: c1e013bed503e8f409f9c0ccc42890d4, type: 3}
|
||||
conArrowMesh: {fileID: 4300000, guid: 825a62388b1ce1040bc1eddefbc5ad23, type: 3}
|
||||
faceMesh: {fileID: 4300036, guid: 1cc1b125262248c4ba967763bf40c861, type: 3}
|
||||
faceDefault: {fileID: 4300030, guid: 1cc1b125262248c4ba967763bf40c861, type: 3}
|
||||
faceEat: {fileID: 4300010, guid: 1cc1b125262248c4ba967763bf40c861, type: 3}
|
||||
faceEaten: {fileID: 4300036, guid: 1cc1b125262248c4ba967763bf40c861, type: 3}
|
||||
|
|
84
Assets/Materials/Skybox.mat
Normal file
84
Assets/Materials/Skybox.mat
Normal file
|
@ -0,0 +1,84 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Skybox
|
||||
m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _SUNDISK_HIGH_QUALITY
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _AtmosphereThickness: 0.91
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _Exposure: 0.44
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SunDisk: 2
|
||||
- _SunSize: 0
|
||||
- _SunSizeConvergence: 5.13
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _GroundColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _SkyTint: {r: 0.5623178, g: 0.77599996, b: 0.23357598, a: 1}
|
8
Assets/Materials/Skybox.mat.meta
Normal file
8
Assets/Materials/Skybox.mat.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 00348783977d35d4e83d6bbcbbb2421c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,4 +1,6 @@
|
|||
Shader "Custom/Snake"
|
||||
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
|
||||
|
||||
Shader "Custom/Snake"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
|
@ -60,10 +62,15 @@
|
|||
|
||||
if (_Flash > 0)
|
||||
{
|
||||
i.color = fixed4(1, 1, 1, 1);
|
||||
return i;
|
||||
i.color = v.color = fixed4(1, 1, 1, 1);
|
||||
// return i;
|
||||
}
|
||||
|
||||
fixed3 worldPos = mul(unity_ObjectToWorld, v.position).xyz;
|
||||
fixed3 viewDir = normalize(UnityWorldSpaceViewDir(worldPos));
|
||||
fixed4 rimColor = fixed4(1, 1, 1, 1);
|
||||
fixed rimStr = 1;
|
||||
|
||||
// if mesh = snake green (for snake head)
|
||||
if (i.color.g > 0.5 && i.color.r < 0.5)
|
||||
{
|
||||
|
@ -81,7 +88,8 @@
|
|||
}
|
||||
|
||||
// Decay
|
||||
i.color *= 1 - ((half)id / 729);
|
||||
float decay = 1 - ((half)id / 729);
|
||||
i.color *= decay;
|
||||
|
||||
if (id == _JustAte)
|
||||
{
|
||||
|
@ -90,8 +98,28 @@
|
|||
|
||||
// Alpha Fix
|
||||
i.color.a = 1;
|
||||
|
||||
// view lighting for depth clarity
|
||||
fixed camDist = distance(worldPos / 7, -normalize(_WorldSpaceCameraPos));
|
||||
// camDist = 30 - camDist;
|
||||
// clamp(0 + camDist / 20, 0, 1);
|
||||
rimStr = clamp(camDist, 0, 1);
|
||||
i.color = lerp(fixed4(0.26, 0.2, 0.23, 1), i.color, rimStr);
|
||||
|
||||
rimColor = fixed4(1, 0.95, 0.75, 1);
|
||||
rimStr *= decay;
|
||||
}
|
||||
|
||||
// Rim lighting
|
||||
fixed rim = 1.0 - saturate(dot (normalize(viewDir), i.normal));
|
||||
i.color = lerp(i.color, rimColor, rim * rim * rim * rimStr);
|
||||
|
||||
if (v.color.r == 1 && v.color.g == 1 && v.color.b == 1)
|
||||
{
|
||||
fixed s = (1 + sin(_Time.x * 800)) / 2;
|
||||
fixed3 strobe = normalize(fixed3(1 - s, s, 1 - s));
|
||||
i.color = fixed4(strobe, 1);
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,13 @@
|
|||
o.normal = UnityObjectToWorldNormal(v.normal);
|
||||
|
||||
fixed4 base = fixed4(1, 1, 1, 1);
|
||||
o.color = base * 0.1 * clamp(dot(o.normal, UnityWorldSpaceViewDir(o.vertex)), 0, 1);
|
||||
fixed3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
|
||||
fixed3 viewDir = normalize(UnityWorldSpaceViewDir(worldPos));
|
||||
// o.color = base * clamp(dot(o.normal, -viewDir), 0, 0.2);
|
||||
|
||||
// Rim lighting
|
||||
fixed rim = 1.0 - saturate(dot (normalize(viewDir), o.normal));
|
||||
o.color = base * rim * rim * 0.2;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,7 @@ public class AI
|
|||
{
|
||||
public int aiChances;
|
||||
|
||||
Quaternion rotation;
|
||||
public Quaternion rot = Quaternion.identity;
|
||||
|
||||
public Vector3Int InputDirection(Main main)
|
||||
{
|
||||
|
@ -14,9 +14,9 @@ public class AI
|
|||
float turnRate = (1 + Mathf.Sin(Time.time)) + (1 + Mathf.Sin(Time.time / 3)) * (1 - (dist / ((float)main.design.bounds.x * 2)));
|
||||
if (main.food != headPos && aiChances == main.design.aiMaxChances)
|
||||
{
|
||||
rotation = Quaternion.Lerp(rotation, Quaternion.LookRotation(main.food - headPos), turnRate * main.design.aiIQ * main.bpm * Time.deltaTime);
|
||||
rot = Quaternion.Lerp(rot, Quaternion.LookRotation(main.food - headPos), turnRate * main.design.aiIQ * main.bpm * Time.deltaTime);
|
||||
|
||||
Vector3Int newDir = Main.SnapDir(rotation * Vector3.forward);
|
||||
Vector3Int newDir = Main.SnapDir(rot * Vector3.forward);
|
||||
|
||||
// rethink this system now that it is seperated from the player inputs
|
||||
// chances get refueled each *ai* step
|
||||
|
@ -31,7 +31,7 @@ public class AI
|
|||
{
|
||||
if (aiChances < main.design.aiMaxChances)
|
||||
{
|
||||
rotation = Quaternion.LookRotation((Vector3)newDir);
|
||||
rot = Quaternion.LookRotation((Vector3)newDir);
|
||||
}
|
||||
|
||||
return newDir;
|
||||
|
|
|
@ -196,23 +196,33 @@ public class BoxUI : MonoBehaviour
|
|||
trackColor.a = 0.5f;
|
||||
}
|
||||
|
||||
void Crash()
|
||||
void Crash(Vector3 dir)
|
||||
{
|
||||
if (!main.aiMode)
|
||||
{
|
||||
string endText;
|
||||
int oldHighscore = PlayerPrefs.GetInt("highscore", 0);
|
||||
|
||||
if (main.snake.Count > oldHighscore)
|
||||
{
|
||||
endText = (main.snake.Count).ToString("000") + " / " + oldHighscore.ToString("000") + "\n^-^";
|
||||
int score = main.snake.Count + main.core.Count;
|
||||
float total = (
|
||||
(1f + main.design.bounds.x * 2f) *
|
||||
(1f + main.design.bounds.y * 2f) *
|
||||
(1f + main.design.bounds.z * 2f)
|
||||
) / 100f;
|
||||
|
||||
PlayerPrefs.SetInt("highscore", main.snake.Count);
|
||||
Debug.Log(total);
|
||||
|
||||
if (score >= oldHighscore)
|
||||
{
|
||||
endText = (score / total).ToString("00.0") + "%\n^-^";
|
||||
|
||||
PlayerPrefs.SetInt("highscore", score);
|
||||
UpdateLabel();
|
||||
}
|
||||
else
|
||||
{
|
||||
endText = (main.snake.Count).ToString("000") + " / " + oldHighscore.ToString("000") + "\n-_-";
|
||||
endText = (score / total).ToString("00.0") + "%\n-_-";
|
||||
// / " + oldHighscore.ToString("000") + "\n-_-";
|
||||
}
|
||||
|
||||
// Use for unlocks and tracking
|
||||
|
|
|
@ -8,6 +8,7 @@ public class Design : ScriptableObject
|
|||
{
|
||||
[Header("View")]
|
||||
public Vector3 headOffset = new Vector3(0, 0, -60);
|
||||
public Vector3 pivotPos;
|
||||
public float scale = 60;
|
||||
|
||||
[Header("Game")]
|
||||
|
|
|
@ -6,133 +6,224 @@ using System.Collections.Generic;
|
|||
using Random = UnityEngine.Random;
|
||||
using NaughtyAttributes;
|
||||
|
||||
|
||||
public class Drip
|
||||
{
|
||||
public Drip(GraphXData data)
|
||||
{
|
||||
this.data = data;
|
||||
|
||||
for (int i = 0; i < drops.Length; i++)
|
||||
{
|
||||
drops[i] = new Drop();
|
||||
}
|
||||
|
||||
for (int i = 0; i < drails.Length; i++)
|
||||
{
|
||||
drails[i] = new Drail();
|
||||
}
|
||||
}
|
||||
|
||||
GraphXData data;
|
||||
// public AnimationCurve animCurve;
|
||||
|
||||
Drop[] drops = new Drop[10];
|
||||
Drail[] drails = new Drail[40];
|
||||
Matrix4x4[] matrices = new Matrix4x4[50];
|
||||
|
||||
// pool
|
||||
// fall and fade
|
||||
// just need to fall at and spawn at a height and rate
|
||||
// to hit the box in time
|
||||
|
||||
// just DRIP DRIP DRIPS
|
||||
// falling shit is distracting and spatially confusing
|
||||
|
||||
// pooling and drip downs
|
||||
// code first then review and refine visually
|
||||
|
||||
// consider the moving parts
|
||||
|
||||
// pools (x and y and size)
|
||||
// check for edge then drip all out (cohesion)so adjust position as dripping
|
||||
|
||||
// and x and y are not world space just 0-1 (square so now skewing ^-^)
|
||||
// map to world space with the rendering
|
||||
// pools and drips all share the same matrix and instanced renderer
|
||||
|
||||
// now with your door open lets get the pooling working before any more lewds
|
||||
|
||||
|
||||
// fix rain & analog visual representation of beat (two birds one stone)
|
||||
|
||||
// public AnimationCurve animCurve; ??
|
||||
|
||||
public class Range
|
||||
{
|
||||
public float min = 0;
|
||||
public float max = 0;
|
||||
|
||||
public Range(float min = 0, float max = 0)
|
||||
{
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
}
|
||||
|
||||
public static Range zero { get { return new Range(0, 0); } }
|
||||
public static Range one { get { return new Range(0, 1); } }
|
||||
|
||||
public float length { get { return max - min; } }
|
||||
public float middle { get { return min + length / 2; } }
|
||||
}
|
||||
|
||||
public class Drop
|
||||
{
|
||||
public float x, z;
|
||||
public float firstY, lastY, rot;
|
||||
public bool down; // ready to go
|
||||
public Quaternion quat;
|
||||
public float scale;
|
||||
|
||||
public Drop()
|
||||
{
|
||||
this.x = 0;
|
||||
this.z = 0;
|
||||
this.firstY = -1000;
|
||||
this.lastY = -1000;
|
||||
this.rot = 0;
|
||||
this.down = true;
|
||||
this.scale = Random.Range(1f, 2f);
|
||||
this.quat = Quaternion.identity;
|
||||
}
|
||||
}
|
||||
|
||||
public class Drail
|
||||
{
|
||||
public Quaternion quat;
|
||||
public float scale;
|
||||
|
||||
public Drail()
|
||||
{
|
||||
this.quat = Quaternion.identity;
|
||||
this.scale = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Drop[] drops = new Drop[9];
|
||||
Matrix4x4[] matrices = new Matrix4x4[9];
|
||||
|
||||
public void Step(Main main)
|
||||
{
|
||||
for (int i = 0; i < drops.Length; i++)
|
||||
{
|
||||
if (drops[i] == null)
|
||||
Drop drop = drops[i];
|
||||
|
||||
if (drop.down && !bumped)
|
||||
{
|
||||
drops[i] = new Drop();
|
||||
drop.quat = UnityEngine.Random.rotation;
|
||||
// nay not a position but rather a quaternion!
|
||||
// that is clamped and scaled to fit the box (builtin corner handling)
|
||||
|
||||
// main.poof.Splash(
|
||||
// ClampOut(drop.quat),
|
||||
// drop.quat * new Vector3(0.1f, 0.1f, 0.3f),
|
||||
// 0.15f
|
||||
// );
|
||||
|
||||
drop.down = false;
|
||||
}
|
||||
else if (drops[i].lastY == 3.5f)
|
||||
else
|
||||
{
|
||||
main.poof.Splash(
|
||||
new Vector3(drops[i].x, 3.5f, drops[i].z),
|
||||
new Vector3(0.3f, 1, 0.3f),
|
||||
0.1f
|
||||
);
|
||||
}
|
||||
|
||||
drops[i].x = Random.Range(-10f, 10f);
|
||||
drops[i].z = Random.Range(-10f, 10f);
|
||||
|
||||
float height = 60f;
|
||||
float offset = Random.Range(-30f, 30f);
|
||||
|
||||
drops[i].firstY = offset + (height / 2);
|
||||
drops[i].lastY = offset - (height / 2);
|
||||
|
||||
drops[i].rot = 360 * Random.value;
|
||||
|
||||
if ((drops[i].x < main.design.bounds.x + 0.5f && drops[i].x > -main.design.bounds.x - 0.5f)
|
||||
&& (drops[i].z < main.design.bounds.z + 0.5f && drops[i].z > -main.design.bounds.z - 0.5f))
|
||||
// recycle
|
||||
// and drip off is as easy as an angle comparison with con direction
|
||||
float angle = Quaternion.Angle(drop.quat, main.inputRot);
|
||||
if (angle < 45 && Random.value < 0.5f)
|
||||
{
|
||||
// if its inside we need precise timing otherwise it doesn't matter
|
||||
drops[i].lastY = 3.5f;
|
||||
drops[i].firstY = drops[i].lastY + height;
|
||||
drop.down = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = 0; j < drails.Length; j++)
|
||||
{
|
||||
Drail drail = drails[j];
|
||||
if (drail.scale == 0 && Random.value < 0.3f)
|
||||
{
|
||||
drail.quat = drop.quat;
|
||||
drail.scale = Random.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
testTime = 0;
|
||||
bumped = false;
|
||||
}
|
||||
|
||||
float testTime;
|
||||
public void Rain(Main main)
|
||||
{
|
||||
testTime += Time.deltaTime * 1.1f;
|
||||
float stepTime = 60f / (float)main.bpm;
|
||||
float lerp = Mathf.Clamp01(testTime / stepTime);
|
||||
|
||||
for (int i = 0; i < drops.Length; i++)
|
||||
{
|
||||
Vector3 pos = Vector3.zero;
|
||||
Vector3 scale = Vector3.zero;
|
||||
float rot = 0;
|
||||
Drop drop = drops[i];
|
||||
|
||||
if (drops[i] != null)
|
||||
float angle = Quaternion.Angle(drop.quat, main.inputRot) / 180f;
|
||||
if (angle < 0.8f)
|
||||
{
|
||||
pos = new Vector3(
|
||||
drops[i].x,
|
||||
Mathf.Lerp(drops[i].firstY, drops[i].lastY, lerp),
|
||||
drops[i].z
|
||||
drop.quat = Quaternion.Slerp(drop.quat, main.inputRot, Time.deltaTime / 10 * angle);
|
||||
}
|
||||
|
||||
Vector3 pos = ClampOut(drop.quat);
|
||||
|
||||
float scale = 1;
|
||||
if (drop.down)
|
||||
{
|
||||
scale = (1 - main.lerp);
|
||||
pos += drop.quat * Vector3.forward * 6f * main.lerp * main.lerp;
|
||||
}
|
||||
else if (main.lerp < 0.1f)
|
||||
{
|
||||
scale *= Mathf.Lerp(1.2f, 1, (main.lerp * main.lerp) / 0.1f);
|
||||
}
|
||||
|
||||
Quaternion rot = drop.quat;
|
||||
rot = Quaternion.LookRotation(Main.SnapDir(rot * Vector3.forward));
|
||||
|
||||
matrices[i].SetTRS(
|
||||
pos,
|
||||
rot,
|
||||
new Vector3(0.1f, 0.1f, 0.08f) * scale * drop.scale
|
||||
);
|
||||
|
||||
|
||||
float s = lerp * 2;
|
||||
if (s > 1)
|
||||
{
|
||||
s = 1 - (s - 1);
|
||||
}
|
||||
|
||||
if (drops[i].lastY == 3.5f)
|
||||
for (int i = 0; i < drails.Length; i++)
|
||||
{
|
||||
s += 0.5f;
|
||||
}
|
||||
Drail drail = drails[i];
|
||||
|
||||
// s *= 10f;
|
||||
scale = new Vector3(
|
||||
s,
|
||||
s * 2 * Vector2.Distance(new Vector2(pos.x, pos.z), new Vector2(main.rig.head.position.x, main.rig.head.position.z)),
|
||||
s
|
||||
drail.scale = Mathf.Max(drail.scale - Time.deltaTime / 6, 0);
|
||||
|
||||
matrices[drops.Length + i].SetTRS(
|
||||
ClampOut(drail.quat),
|
||||
Quaternion.LookRotation(Main.SnapDir(drail.quat * Vector3.forward)),
|
||||
Vector3.one * drail.scale * 0.06f
|
||||
);
|
||||
|
||||
rot = drops[i].rot;
|
||||
}
|
||||
|
||||
matrices[i].SetTRS(pos, Quaternion.Euler(0, rot, 0), scale);
|
||||
}
|
||||
Graphics.DrawMeshInstanced(data.dripMesh, 0, data.wetMat, matrices);
|
||||
}
|
||||
|
||||
void OnDrawGizmos()
|
||||
bool bumped = false;
|
||||
public void Bump(Vector3 dir)
|
||||
{
|
||||
// for (int i = 0; i < tracks.Length; i++)
|
||||
// {
|
||||
// for (int j = 0; j < tracks[i].positionCount; j++)
|
||||
// {
|
||||
// Gizmos.color = Color.black;
|
||||
// Gizmos.DrawSphere(tracks[i].GetPosition(j), 0.1f);
|
||||
// }
|
||||
// }
|
||||
for (int i = 0; i < drops.Length; i++)
|
||||
{
|
||||
Drop drop = drops[i];
|
||||
|
||||
drop.quat = Quaternion.Lerp(drop.quat, Quaternion.LookRotation(dir), 0.1f);
|
||||
|
||||
float angle = Quaternion.Angle(drop.quat, Quaternion.LookRotation(dir));
|
||||
if (angle < 90)
|
||||
{
|
||||
drop.down = true;
|
||||
}
|
||||
}
|
||||
bumped = true;
|
||||
}
|
||||
|
||||
public Vector3 ClampOut(Quaternion quat)
|
||||
{
|
||||
Vector3 pos = quat * Vector3.forward * 7.5f;
|
||||
pos.x = Mathf.Clamp(pos.x, -3.5f, 3.5f);
|
||||
pos.y = Mathf.Clamp(pos.y, -2.5f, 2.5f);
|
||||
pos.z = Mathf.Clamp(pos.z, -3.5f, 3.5f);
|
||||
|
||||
return pos;
|
||||
}
|
||||
}
|
|
@ -6,7 +6,7 @@ public class Game
|
|||
{
|
||||
Vector3Int[] poss = new Vector3Int[9 * 7 * 9]; // not bounds compliant...
|
||||
|
||||
public delegate void Step();
|
||||
public delegate void Step(int full);
|
||||
public static event Step OnStep;
|
||||
|
||||
public delegate void Eat(Vector3 pos);
|
||||
|
@ -18,14 +18,14 @@ public class Game
|
|||
public delegate void Bump(Vector3 dir);
|
||||
public static event Bump OnBump;
|
||||
|
||||
public delegate void Crash();
|
||||
public delegate void Crash(Vector3 dir);
|
||||
public static event Crash OnCrash;
|
||||
|
||||
|
||||
bool danger;
|
||||
public void SnakeStep(Main main, Design design) // snake data?
|
||||
{
|
||||
OnStep();
|
||||
OnStep(main.growQueue);
|
||||
|
||||
Vector3Int future = main.snake[0] + main.dir;
|
||||
if (main.snake.Contains(future) || Main.OutOfBounds(future, design.bounds))
|
||||
|
@ -41,7 +41,7 @@ public class Game
|
|||
{
|
||||
main.snake.Insert(0, future);
|
||||
|
||||
OnCrash();
|
||||
OnCrash(main.dir);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -79,17 +79,15 @@ public class Game
|
|||
main.growQueue += design.foodValue;
|
||||
main.justAte = 0;
|
||||
|
||||
OnEat(future);
|
||||
|
||||
if (main.space.Count == 0)
|
||||
{
|
||||
PlayerPrefs.SetInt("BoxFills", 1 + PlayerPrefs.GetInt("BoxFills", 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
main.food = main.space[Random.Range(0, main.space.Count)];
|
||||
main.graphX.foodScale = 0;
|
||||
|
||||
OnEat(future);
|
||||
}
|
||||
|
||||
if (main.space.Count <= 1)
|
||||
{
|
||||
PlayerPrefs.SetInt("BoxFills", 1 + PlayerPrefs.GetInt("BoxFills", 0));
|
||||
}
|
||||
|
||||
// Eat main.Core Piece
|
||||
|
|
|
@ -10,31 +10,75 @@ public class GraphX
|
|||
}
|
||||
|
||||
GraphXData data;
|
||||
Vector3 spinOffset;
|
||||
Quaternion spin = Quaternion.identity;
|
||||
|
||||
Matrix4x4[] bodyMatrices = new Matrix4x4[9 * 7 * 9];
|
||||
Matrix4x4[] coreMatrices = new Matrix4x4[3 * 3 * 3];
|
||||
Matrix4x4 foodMatrix = new Matrix4x4();
|
||||
Matrix4x4 tongueMatrix = new Matrix4x4();
|
||||
Matrix4x4 arrowMatrix = new Matrix4x4();
|
||||
Matrix4x4 faceMatrix = new Matrix4x4();
|
||||
Matrix4x4 controllerMatrix = new Matrix4x4();
|
||||
Matrix4x4 joystickMatrix = new Matrix4x4();
|
||||
Matrix4x4 conArrowMatrix = new Matrix4x4();
|
||||
|
||||
public float foodScale = 0;
|
||||
|
||||
public float Exp(float value, int power)
|
||||
{
|
||||
for (int i = 0; i < power; i++)
|
||||
{
|
||||
value *= value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public Quaternion GetNormalized(Quaternion q)
|
||||
{
|
||||
float f = 1f / Mathf.Sqrt(q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w);
|
||||
return new Quaternion(q.x * f, q.y * f, q.z * f, q.w * f);
|
||||
}
|
||||
|
||||
public void Render(Main main)
|
||||
{
|
||||
Vector3 angleDelta = new Vector3(Exp(Mathf.Sin(Time.time * spinOffset.x), 3), Exp(Mathf.Sin(Time.time * spinOffset.y), 3), Exp(Mathf.Sin(Time.time * spinOffset.z), 3)) * Time.deltaTime * 180;
|
||||
if (angleDelta.sqrMagnitude < 0.1)
|
||||
{
|
||||
spinOffset = new Vector3(
|
||||
0.5f + Random.value,
|
||||
0.5f + Random.value,
|
||||
0.5f + Random.value
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
spin = Quaternion.Euler(angleDelta) * spin;
|
||||
}
|
||||
|
||||
foodScale = Mathf.Lerp(foodScale, 1, 6 * Time.deltaTime);
|
||||
foodMatrix.SetTRS(
|
||||
main.food,
|
||||
Quaternion.Euler(new Vector3(Mathf.Sin(Time.time), Mathf.Sin(Time.time / 2), Mathf.Sin(Time.time / 3)) * 30),
|
||||
GetNormalized(spin),
|
||||
foodScale * Vector3.one
|
||||
); Graphics.DrawMesh(data.foodMesh, foodMatrix, data.unlitMat, 0);
|
||||
); Graphics.DrawMesh(data.foodMesh, foodMatrix, data.snakeMat, 0);
|
||||
|
||||
if (main.playing && (data.faceMesh == data.faceDefault || data.faceMesh == data.faceEaten))
|
||||
{
|
||||
tongueMatrix.SetTRS(
|
||||
main.snake[0],
|
||||
main.inputRot,
|
||||
Vector3.one
|
||||
); Graphics.DrawMesh(data.tongueMesh, tongueMatrix, data.snakeMat, 0);
|
||||
}
|
||||
|
||||
if (!main.aiMode && main.playing)
|
||||
{
|
||||
arrowMatrix.SetTRS(
|
||||
main.snake[0],
|
||||
main.rig.controllerRot,
|
||||
main.design.pivotPos + main.rig.head.rotation * Vector3.up * 2f,
|
||||
main.inputRot,
|
||||
Vector3.one
|
||||
); Graphics.DrawMesh(data.arrowMesh, arrowMatrix, data.unlitMat, 0);
|
||||
); Graphics.DrawMesh(data.arrowMesh, arrowMatrix, data.snakeMat, 0);
|
||||
}
|
||||
|
||||
// Face
|
||||
|
@ -78,7 +122,7 @@ public class GraphX
|
|||
coreMatrices[i].SetTRS(Vector3.zero, Quaternion.identity, Vector3.zero);
|
||||
}
|
||||
}
|
||||
Graphics.DrawMeshInstanced(data.coreMesh, 0, data.unlitMat, coreMatrices);
|
||||
Graphics.DrawMeshInstanced(data.coreMesh, 0, data.snakeMat, coreMatrices);
|
||||
|
||||
|
||||
// Body Roll
|
||||
|
@ -95,6 +139,27 @@ public class GraphX
|
|||
|
||||
rollTime = Mathf.Clamp01((60 / (float)main.bpm) / 27);
|
||||
}
|
||||
|
||||
controllerMatrix.SetTRS(
|
||||
main.rig.controllerPos,
|
||||
main.rig.controllerRot * Quaternion.Euler(Vector3.up * 90),
|
||||
Vector3.one * main.design.scale
|
||||
); Graphics.DrawMesh(data.controllerMesh, controllerMatrix, data.unlitMat, 0);
|
||||
|
||||
conArrowMatrix.SetTRS(
|
||||
main.rig.controllerPos,
|
||||
main.rig.inputRot,
|
||||
Vector3.one * main.design.scale
|
||||
); Graphics.DrawMesh(data.conArrowMesh, conArrowMatrix, data.unlitMat, 0);
|
||||
|
||||
Vector3 pointTo = main.rig.inputRot * Vector3.Lerp(Vector3.up, Vector3.forward, main.rig.joystick.magnitude / 3);
|
||||
|
||||
// * Quaternion.Euler(Vector3.right * -90)
|
||||
joystickMatrix.SetTRS(
|
||||
main.rig.controllerPos,
|
||||
Quaternion.LookRotation(pointTo),
|
||||
Vector3.one * main.design.scale
|
||||
); Graphics.DrawMesh(data.joystickMesh, joystickMatrix, data.unlitMat, 0);
|
||||
}
|
||||
|
||||
float rollTime;
|
||||
|
|
|
@ -6,13 +6,17 @@ using System.Collections.Generic;
|
|||
[CreateAssetMenu]
|
||||
public class GraphXData : ScriptableObject
|
||||
{
|
||||
public Mesh foodMesh, arrowMesh, bodyMesh, coreMesh;
|
||||
public Mesh foodMesh, arrowMesh, tongueMesh, bodyMesh, coreMesh;
|
||||
|
||||
[Header("Materials")]
|
||||
public Material snakeMat;
|
||||
public Material unlitMat;
|
||||
public Material wetMat;
|
||||
|
||||
[Header("Controls")]
|
||||
public Mesh controllerMesh;
|
||||
public Mesh joystickMesh, conArrowMesh;
|
||||
|
||||
[Header("Faces")]
|
||||
public Mesh faceMesh;
|
||||
public Mesh faceDefault, faceEat, faceEaten, faceBump, faceBoxGameover, faceSelfGameover;
|
||||
|
|
|
@ -9,11 +9,12 @@ using TMPro;
|
|||
|
||||
public class Main : MonoBehaviour
|
||||
{
|
||||
|
||||
|
||||
public delegate void GameStart(Main main);
|
||||
public static event GameStart OnGameStart;
|
||||
|
||||
public delegate void Reset();
|
||||
public static event Reset OnReset;
|
||||
|
||||
public bool sideQuest;
|
||||
|
||||
[Header("References")]
|
||||
|
@ -37,7 +38,6 @@ public class Main : MonoBehaviour
|
|||
public SFX sfx;
|
||||
public AudioSource sfxSource;
|
||||
|
||||
|
||||
[Header("Positions")]
|
||||
public List<Vector3Int> snake, initialSnake;
|
||||
public List<Vector3Int> core, initialCore;
|
||||
|
@ -50,6 +50,7 @@ public class Main : MonoBehaviour
|
|||
public bool aiMode = true;
|
||||
public int growQueue, fastQueue;
|
||||
public int justAte;
|
||||
public Quaternion inputRot = Quaternion.identity;
|
||||
|
||||
public float dirDelay;
|
||||
|
||||
|
@ -81,20 +82,37 @@ public class Main : MonoBehaviour
|
|||
snakeFace = new SnakeFace(graphXData);
|
||||
poof = new Poof(graphXData);
|
||||
drip = new Drip(graphXData);
|
||||
Game.OnBump += drip.Bump;
|
||||
|
||||
|
||||
restart = 0;
|
||||
}
|
||||
|
||||
void Crash()
|
||||
void Crash(Vector3 dir)
|
||||
{
|
||||
fastQueue = 0;
|
||||
playing = false;
|
||||
restart = 0;
|
||||
}
|
||||
|
||||
public float lerp = 0;
|
||||
Quaternion aiRot = Quaternion.identity;
|
||||
void Update()
|
||||
{
|
||||
float beatScale = (float)bpm / 60f;
|
||||
lerp += beatScale * Time.deltaTime;
|
||||
lerp = Mathf.Clamp01(lerp);
|
||||
|
||||
if (aiMode)
|
||||
{
|
||||
aiRot = Quaternion.Lerp(aiRot, ai.rot, Time.deltaTime * 6);
|
||||
inputRot = aiRot;
|
||||
}
|
||||
else
|
||||
{
|
||||
inputRot = rig.inputRot;
|
||||
}
|
||||
|
||||
dirDelay -= Time.deltaTime;
|
||||
if (playing && dirDelay < 0 && snake.Count >= initialSnake.Count)
|
||||
{
|
||||
|
@ -128,6 +146,7 @@ public class Main : MonoBehaviour
|
|||
public int restart = 0; // set to zero during playtime to restart manually
|
||||
public void Beat()
|
||||
{
|
||||
lerp = 0;
|
||||
switch (restart)
|
||||
{
|
||||
case (0):
|
||||
|
@ -146,6 +165,7 @@ public class Main : MonoBehaviour
|
|||
Shader.SetGlobalInt("_Flash", 1);
|
||||
food = initialFood;
|
||||
restart++;
|
||||
OnReset();
|
||||
break;
|
||||
|
||||
case (2):
|
||||
|
|
|
@ -83,7 +83,7 @@ public class Poof
|
|||
{
|
||||
if (oldFoodPos != main.food)
|
||||
{
|
||||
Burst(main.food, 0.1f, 0.2f);
|
||||
Burst(main.food, 0.1f, 0.5f);
|
||||
oldFoodPos = main.food;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,11 +10,13 @@ public class Rig : MonoBehaviour
|
|||
public Design design;
|
||||
public Main main;
|
||||
public GameObject disconnected;
|
||||
public Transform head;
|
||||
public Transform head, hangingRod;
|
||||
|
||||
[Header("Variables")]
|
||||
public OVRInput.Controller remote;
|
||||
public Quaternion controllerRot = Quaternion.identity;
|
||||
public Quaternion inputRot = Quaternion.identity;
|
||||
public Vector3 controllerPos, joystick;
|
||||
|
||||
bool leftOn, rightOn, touchOn;
|
||||
Vector3 headOffset;
|
||||
|
@ -25,8 +27,10 @@ public class Rig : MonoBehaviour
|
|||
void Start()
|
||||
{
|
||||
Game.OnBump += Bump;
|
||||
Game.OnCrash += Bump;
|
||||
|
||||
headOffset.y = 32f;
|
||||
// headOffset.y = 32f;
|
||||
headOffset.y = design.headOffset.y;
|
||||
headOffset.z = design.headOffset.z;
|
||||
ready = false;
|
||||
}
|
||||
|
@ -72,7 +76,10 @@ public class Rig : MonoBehaviour
|
|||
if (headsetRot != null)
|
||||
{
|
||||
head.rotation = headsetRot;
|
||||
head.position = headsetRot * headOffset;
|
||||
// Quaternion.LookRotation(head.forward, head.up);
|
||||
hangingRod.position = design.pivotPos;
|
||||
hangingRod.rotation = headsetRot;
|
||||
head.position = design.pivotPos + (headsetRot * headOffset);
|
||||
head.localScale = Vector3.one * design.scale;
|
||||
}
|
||||
|
||||
|
@ -82,12 +89,25 @@ public class Rig : MonoBehaviour
|
|||
head.position += boxOffset;
|
||||
|
||||
|
||||
controllerRot = OVRInput.GetLocalControllerRotation(remote) * Quaternion.Euler(-30, 0, 0);
|
||||
// controllerRot = OVRInput.GetLocalControllerRotation(remote) * Quaternion.Euler(-30, 0, 0);
|
||||
Vector3 headsetPos = InputTracking.GetLocalPosition(XRNode.Head);
|
||||
|
||||
controllerPos = OVRInput.GetLocalControllerPosition(remote) * design.scale;
|
||||
controllerPos = controllerPos - headsetPos * design.scale;
|
||||
controllerPos += head.position;
|
||||
inputRot = controllerRot = OVRInput.GetLocalControllerRotation(remote);
|
||||
|
||||
joystick = OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick, remote);
|
||||
joystick = new Vector3(joystick.x, 0, joystick.y);
|
||||
if (joystick.sqrMagnitude > 0)
|
||||
{
|
||||
inputRot *= Quaternion.LookRotation(joystick);
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3Int InputDirection(Main main)
|
||||
{
|
||||
Vector3Int newDir = Main.SnapDir((controllerRot * Vector3.forward));
|
||||
Vector3Int newDir = Main.SnapDir((inputRot * Vector3.forward));
|
||||
|
||||
// no neck snaps
|
||||
if (main.snake[0] + newDir != main.snake[1])
|
||||
|
|
|
@ -17,7 +17,7 @@ public class SFX
|
|||
// the only sfxs that are not step based is the UI
|
||||
// same class different audioSources
|
||||
|
||||
void SnakeStep()
|
||||
void SnakeStep(int full)
|
||||
{
|
||||
data.PickClip(data.sfxSteps);
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ public class SFX
|
|||
data.PickClip(data.sfxBumps);
|
||||
}
|
||||
|
||||
void Crash()
|
||||
void Crash(Vector3 dir)
|
||||
{
|
||||
data.queuedClip = data.sfxCrash;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ public class SnakeFace
|
|||
public SnakeFace(GraphXData data)
|
||||
{
|
||||
Main.OnGameStart += this.GameStart;
|
||||
Main.OnReset += this.Reset;
|
||||
Game.OnStep += this.Step;
|
||||
Game.OnSmell += this.Smell;
|
||||
Game.OnEat += this.Eat;
|
||||
|
@ -21,11 +22,23 @@ public class SnakeFace
|
|||
data.faceMesh = data.faceDefault;
|
||||
}
|
||||
|
||||
void Step()
|
||||
void Reset()
|
||||
{
|
||||
data.faceMesh = data.faceDefault;
|
||||
}
|
||||
|
||||
void Step(int full)
|
||||
{
|
||||
if (full > 0)
|
||||
{
|
||||
data.faceMesh = data.faceEaten;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.faceMesh = data.faceDefault;
|
||||
}
|
||||
}
|
||||
|
||||
void Smell()
|
||||
{
|
||||
data.faceMesh = data.faceEat;
|
||||
|
@ -41,7 +54,7 @@ public class SnakeFace
|
|||
data.faceMesh = data.faceBump;
|
||||
}
|
||||
|
||||
void Crash()
|
||||
void Crash(Vector3 dir)
|
||||
{
|
||||
data.faceMesh = data.faceSelfGameover;
|
||||
|
||||
|
|
BIN
Assets/arow.fbx
Normal file
BIN
Assets/arow.fbx
Normal file
Binary file not shown.
106
Assets/arow.fbx.meta
Normal file
106
Assets/arow.fbx.meta
Normal file
|
@ -0,0 +1,106 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 825a62388b1ce1040bc1eddefbc5ad23
|
||||
ModelImporter:
|
||||
serializedVersion: 23
|
||||
fileIDToRecycleName:
|
||||
100000: //RootNode
|
||||
400000: //RootNode
|
||||
2100000: Material
|
||||
2300000: //RootNode
|
||||
3300000: //RootNode
|
||||
4300000: Arrow
|
||||
7400000: Arrow|ArrowAction
|
||||
7400002: Arrow|CubeAction
|
||||
7400004: Arrow|CubeAction.001
|
||||
7400006: Arrow|Empty.001Action
|
||||
7400008: Arrow|EmptyAction
|
||||
7400010: Arrow|EmptyAction.001
|
||||
7400012: Arrow|JoystickAction
|
||||
9500000: //RootNode
|
||||
2186277476908879412: ImportLogs
|
||||
externalObjects: {}
|
||||
materials:
|
||||
importMaterials: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 3
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
preserveHierarchy: 0
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
previousCalculatedGlobalScale: 0.099999994
|
||||
hasPreviousCalculatedGlobalScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
serializedVersion: 2
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/controller.fbx
Normal file
BIN
Assets/controller.fbx
Normal file
Binary file not shown.
97
Assets/controller.fbx.meta
Normal file
97
Assets/controller.fbx.meta
Normal file
|
@ -0,0 +1,97 @@
|
|||
fileFormatVersion: 2
|
||||
guid: cb69a79fa4024c943846e5fefb4d90b4
|
||||
ModelImporter:
|
||||
serializedVersion: 23
|
||||
fileIDToRecycleName:
|
||||
100000: //RootNode
|
||||
400000: //RootNode
|
||||
2100000: Material
|
||||
2300000: //RootNode
|
||||
3300000: //RootNode
|
||||
4300000: Controller
|
||||
externalObjects: {}
|
||||
materials:
|
||||
importMaterials: 0
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 3
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
preserveHierarchy: 0
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
previousCalculatedGlobalScale: 1
|
||||
hasPreviousCalculatedGlobalScale: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
importAnimation: 0
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
serializedVersion: 2
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
|
@ -44,6 +44,12 @@ ModelImporter:
|
|||
100076: Core.001
|
||||
100078: Drip
|
||||
100080: Poof
|
||||
100082: Hanging
|
||||
100084: Arrow_Backup
|
||||
100086: HangingRod
|
||||
100088: FoodOld
|
||||
100090: Tongue
|
||||
100092: WetBox
|
||||
400000: Arrow
|
||||
400002: //RootNode
|
||||
400004: Face0Default
|
||||
|
@ -85,6 +91,12 @@ ModelImporter:
|
|||
400076: Core.001
|
||||
400078: Drip
|
||||
400080: Poof
|
||||
400082: Hanging
|
||||
400084: Arrow_Backup
|
||||
400086: HangingRod
|
||||
400088: FoodOld
|
||||
400090: Tongue
|
||||
400092: WetBox
|
||||
2100000: No Name
|
||||
2300000: Arrow
|
||||
2300002: Face0Default
|
||||
|
@ -126,6 +138,12 @@ ModelImporter:
|
|||
2300074: Core.001
|
||||
2300076: Drip
|
||||
2300078: Poof
|
||||
2300080: Hanging
|
||||
2300082: Arrow_Backup
|
||||
2300084: HangingRod
|
||||
2300086: FoodOld
|
||||
2300088: Tongue
|
||||
2300090: WetBox
|
||||
3300000: Arrow
|
||||
3300002: Face0Default
|
||||
3300004: Face1Eat
|
||||
|
@ -166,6 +184,12 @@ ModelImporter:
|
|||
3300074: Core.001
|
||||
3300076: Drip
|
||||
3300078: Poof
|
||||
3300080: Hanging
|
||||
3300082: Arrow_Backup
|
||||
3300084: HangingRod
|
||||
3300086: FoodOld
|
||||
3300088: Tongue
|
||||
3300090: WetBox
|
||||
4300000: Arrow
|
||||
4300002: InsideOut
|
||||
4300004: Segment
|
||||
|
@ -206,6 +230,12 @@ ModelImporter:
|
|||
4300074: Core.001
|
||||
4300076: Drip
|
||||
4300078: Poof
|
||||
4300080: Hanging
|
||||
4300082: Arrow_Backup
|
||||
4300084: HangingRod
|
||||
4300086: FoodOld
|
||||
4300088: Tongue
|
||||
4300090: WetBox
|
||||
9500000: //RootNode
|
||||
2186277476908879412: ImportLogs
|
||||
externalObjects: {}
|
||||
|
|
Binary file not shown.
BIN
Assets/joystick.fbx
Normal file
BIN
Assets/joystick.fbx
Normal file
Binary file not shown.
106
Assets/joystick.fbx.meta
Normal file
106
Assets/joystick.fbx.meta
Normal file
|
@ -0,0 +1,106 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c1e013bed503e8f409f9c0ccc42890d4
|
||||
ModelImporter:
|
||||
serializedVersion: 23
|
||||
fileIDToRecycleName:
|
||||
100000: //RootNode
|
||||
400000: //RootNode
|
||||
2100000: Material
|
||||
2300000: //RootNode
|
||||
3300000: //RootNode
|
||||
4300000: Joystick
|
||||
7400000: Joystick|ArrowAction
|
||||
7400002: Joystick|CubeAction
|
||||
7400004: Joystick|CubeAction.001
|
||||
7400006: Joystick|Empty.001Action
|
||||
7400008: Joystick|EmptyAction
|
||||
7400010: Joystick|EmptyAction.001
|
||||
7400012: Joystick|JoystickAction
|
||||
9500000: //RootNode
|
||||
2186277476908879412: ImportLogs
|
||||
externalObjects: {}
|
||||
materials:
|
||||
importMaterials: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 3
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
preserveHierarchy: 0
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
previousCalculatedGlobalScale: 0.099999994
|
||||
hasPreviousCalculatedGlobalScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
serializedVersion: 2
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -38,7 +38,6 @@ GraphicsSettings:
|
|||
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_PreloadedShaders: []
|
||||
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
|
||||
type: 0}
|
||||
|
|
|
@ -106,6 +106,7 @@ PlayerSettings:
|
|||
xboxOneMonoLoggingLevel: 0
|
||||
xboxOneLoggingLevel: 1
|
||||
xboxOneDisableEsram: 0
|
||||
xboxOneEnableTypeOptimization: 0
|
||||
xboxOnePresentImmediateThreshold: 0
|
||||
switchQueueCommandMemory: 0
|
||||
switchQueueControlMemory: 16384
|
||||
|
@ -120,7 +121,7 @@ PlayerSettings:
|
|||
16:10: 1
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 7
|
||||
bundleVersion: 8
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
|
@ -161,7 +162,7 @@ PlayerSettings:
|
|||
Android: com.dofdev.SnakeInABox
|
||||
Standalone: com.dofdev.SnakeInABox
|
||||
buildNumber: {}
|
||||
AndroidBundleVersionCode: 57
|
||||
AndroidBundleVersionCode: 58
|
||||
AndroidMinSdkVersion: 22
|
||||
AndroidTargetSdkVersion: 0
|
||||
AndroidPreferredInstallLocation: 0
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
UnityConnectSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 1
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_TestMode: 0
|
||||
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
|
||||
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
|
||||
|
|
Reference in a new issue