Skip to content

Commit 78fbbd5

Browse files
committed
CutsceneDirector
1 parent 2c9670e commit 78fbbd5

19 files changed

+536
-322
lines changed

Source Code/M-Unity's Weird Website/Assembly-CSharp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<Compile Include="Assets/TextMesh Pro/Examples &amp; Extras/Scripts/EnvMapAnimator.cs" />
7070
<Compile Include="Assets/TextMesh Pro/Examples &amp; Extras/Scripts/TMP_TextSelector_A.cs" />
7171
<Compile Include="Assets/TextMesh Pro/Examples &amp; Extras/Scripts/Benchmark02.cs" />
72+
<Compile Include="Assets/CutsceneDirector.cs" />
7273
<Compile Include="Assets/TextMesh Pro/Examples &amp; Extras/Scripts/TMP_ExampleScript_01.cs" />
7374
<Compile Include="Assets/TextMesh Pro/Examples &amp; Extras/Scripts/TMPro_InstructionOverlay.cs" />
7475
<Compile Include="Assets/TextMesh Pro/Examples &amp; Extras/Scripts/VertexShakeB.cs" />

Source Code/M-Unity's Weird Website/Assets/AnimationDirector.cs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using DG.Tweening;
22
using UnityEngine;
3+
using Unity.Burst;
4+
[BurstCompile]
35
public class AnimationDirector : MonoBehaviour
46
{
57
public enum BodyPart
@@ -19,16 +21,6 @@ public enum BodyPart
1921
public GameObject LegRight;
2022
public GameObject Head;
2123
private GameObject CurrentPart;
22-
private void Start()
23-
{
24-
25-
}
26-
27-
// Update is called once per frame
28-
private void Update()
29-
{
30-
//print(BodyPart.Body.ToString());
31-
}
3224
public void MovePart(BodyPart Part, Vector3 MovePosition, float MoveDuration)
3325
{
3426
if (Part.Equals(BodyPart.Whole)) CurrentPart = gameObject;
@@ -43,7 +35,7 @@ public void RotatePart(BodyPart Part, Vector3 RotatePosition, float RotateDurati
4335
}
4436
public void DefaultMove()
4537
{
46-
MovePart(BodyPart.Whole, new Vector3 (2,0,0), 2);
38+
MovePart(BodyPart.Whole, new Vector3 (2,0,0), 1);
4739
RotatePart(BodyPart.Whole, new Vector3 (0,-90,0), 2);
4840
RotatePart(BodyPart.ArmLeft, new Vector3 (-125,0,0), 2);
4941
}

Source Code/M-Unity's Weird Website/Assets/CharacterRunningCactus Variant.prefab

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,19 +1374,19 @@ PrefabInstance:
13741374
objectReference: {fileID: 0}
13751375
- target: {fileID: -8679921383154817045, guid: a5bf33f5e1821db3a9aacb8f353b6dab, type: 3}
13761376
propertyPath: m_LocalRotation.w
1377-
value: 0
1377+
value: 1
13781378
objectReference: {fileID: 0}
13791379
- target: {fileID: -8679921383154817045, guid: a5bf33f5e1821db3a9aacb8f353b6dab, type: 3}
13801380
propertyPath: m_LocalRotation.x
1381-
value: -0
1381+
value: 0
13821382
objectReference: {fileID: 0}
13831383
- target: {fileID: -8679921383154817045, guid: a5bf33f5e1821db3a9aacb8f353b6dab, type: 3}
13841384
propertyPath: m_LocalRotation.y
1385-
value: 1
1385+
value: 0
13861386
objectReference: {fileID: 0}
13871387
- target: {fileID: -8679921383154817045, guid: a5bf33f5e1821db3a9aacb8f353b6dab, type: 3}
13881388
propertyPath: m_LocalRotation.z
1389-
value: -0
1389+
value: 0
13901390
objectReference: {fileID: 0}
13911391
- target: {fileID: -8679921383154817045, guid: a5bf33f5e1821db3a9aacb8f353b6dab, type: 3}
13921392
propertyPath: m_LocalEulerAnglesHint.x
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using UnityEngine;
2+
using System.Collections;
3+
public class CutsceneDirector : MonoBehaviour
4+
{
5+
[SerializeField] private GameObject MUnity;
6+
[SerializeField] private GameObject RunningCactus;
7+
private void Start()
8+
{
9+
StartCoroutine(Walking(MUnity.GetComponent<AnimationDirector>(),0.75f));
10+
11+
//StartCoroutine(nameof(CutScene));
12+
}
13+
private void FixedUpdate()
14+
{
15+
MUnity.GetComponent<AnimationDirector>().Head.transform.Rotate(0,15,0);
16+
}
17+
private IEnumerator CutScene()
18+
{
19+
yield return new WaitForSeconds(1);
20+
21+
}
22+
private IEnumerator Walking(AnimationDirector Player, float Speed)
23+
{
24+
while(true)
25+
{
26+
Player.RotatePart(AnimationDirector.BodyPart.LegRight,new Vector3(-20,0,0), Speed);
27+
Player.RotatePart(AnimationDirector.BodyPart.LegLeft,new Vector3(20,0,0), Speed);
28+
Player.RotatePart(AnimationDirector.BodyPart.ArmRight,new Vector3(20,0,0), Speed);
29+
Player.RotatePart(AnimationDirector.BodyPart.ArmLeft,new Vector3(-20,0,0), Speed);
30+
yield return new WaitForSeconds(Speed);
31+
Player.RotatePart(AnimationDirector.BodyPart.LegRight,new Vector3(20,0,0), Speed);
32+
Player.RotatePart(AnimationDirector.BodyPart.LegLeft,new Vector3(-20,0,0), Speed);
33+
Player.RotatePart(AnimationDirector.BodyPart.ArmRight,new Vector3(-20,0,0), Speed);
34+
Player.RotatePart(AnimationDirector.BodyPart.ArmLeft,new Vector3(20,0,0), Speed);
35+
yield return new WaitForSeconds(Speed);
36+
}
37+
}
38+
}

Source Code/M-Unity's Weird Website/Assets/CutsceneDirector.cs.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source Code/M-Unity's Weird Website/Assets/Materials/New Material.mat renamed to Source Code/M-Unity's Weird Website/Assets/Materials/M-Unity.mat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Material:
2020
m_CorrespondingSourceObject: {fileID: 0}
2121
m_PrefabInstance: {fileID: 0}
2222
m_PrefabAsset: {fileID: 0}
23-
m_Name: New Material
23+
m_Name: M-Unity
2424
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
2525
m_Parent: {fileID: 0}
2626
m_ModifiedSerializedProperties: 0

Source Code/M-Unity's Weird Website/Assets/Materials/New Material.mat.meta renamed to Source Code/M-Unity's Weird Website/Assets/Materials/M-Unity.mat.meta

File renamed without changes.

Source Code/M-Unity's Weird Website/Assets/Materials/New Material 1.mat renamed to Source Code/M-Unity's Weird Website/Assets/Materials/Running Cactus.mat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Material:
2020
m_CorrespondingSourceObject: {fileID: 0}
2121
m_PrefabInstance: {fileID: 0}
2222
m_PrefabAsset: {fileID: 0}
23-
m_Name: New Material 1
23+
m_Name: Running Cactus
2424
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
2525
m_Parent: {fileID: 0}
2626
m_ModifiedSerializedProperties: 0

Source Code/M-Unity's Weird Website/Assets/Materials/New Material 1.mat.meta renamed to Source Code/M-Unity's Weird Website/Assets/Materials/Running Cactus.mat.meta

File renamed without changes.
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &-2548394738615576866
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 11
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_GameObject: {fileID: 0}
10+
m_Enabled: 1
11+
m_EditorHideFlags: 0
12+
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
13+
m_Name:
14+
m_EditorClassIdentifier:
15+
version: 9
16+
--- !u!21 &2100000
17+
Material:
18+
serializedVersion: 8
19+
m_ObjectHideFlags: 0
20+
m_CorrespondingSourceObject: {fileID: 0}
21+
m_PrefabInstance: {fileID: 0}
22+
m_PrefabAsset: {fileID: 0}
23+
m_Name: Skybox
24+
m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0}
25+
m_Parent: {fileID: 0}
26+
m_ModifiedSerializedProperties: 0
27+
m_ValidKeywords:
28+
- _SUNDISK_HIGH_QUALITY
29+
m_InvalidKeywords: []
30+
m_LightmapFlags: 4
31+
m_EnableInstancingVariants: 0
32+
m_DoubleSidedGI: 0
33+
m_CustomRenderQueue: -1
34+
stringTagMap: {}
35+
disabledShaderPasses:
36+
- MOTIONVECTORS
37+
m_LockedProperties:
38+
m_SavedProperties:
39+
serializedVersion: 3
40+
m_TexEnvs:
41+
- _BaseMap:
42+
m_Texture: {fileID: 0}
43+
m_Scale: {x: 1, y: 1}
44+
m_Offset: {x: 0, y: 0}
45+
- _BumpMap:
46+
m_Texture: {fileID: 0}
47+
m_Scale: {x: 1, y: 1}
48+
m_Offset: {x: 0, y: 0}
49+
- _DetailAlbedoMap:
50+
m_Texture: {fileID: 0}
51+
m_Scale: {x: 1, y: 1}
52+
m_Offset: {x: 0, y: 0}
53+
- _DetailMask:
54+
m_Texture: {fileID: 0}
55+
m_Scale: {x: 1, y: 1}
56+
m_Offset: {x: 0, y: 0}
57+
- _DetailNormalMap:
58+
m_Texture: {fileID: 0}
59+
m_Scale: {x: 1, y: 1}
60+
m_Offset: {x: 0, y: 0}
61+
- _EmissionMap:
62+
m_Texture: {fileID: 0}
63+
m_Scale: {x: 1, y: 1}
64+
m_Offset: {x: 0, y: 0}
65+
- _MainTex:
66+
m_Texture: {fileID: 0}
67+
m_Scale: {x: 1, y: 1}
68+
m_Offset: {x: 0, y: 0}
69+
- _MetallicGlossMap:
70+
m_Texture: {fileID: 0}
71+
m_Scale: {x: 1, y: 1}
72+
m_Offset: {x: 0, y: 0}
73+
- _OcclusionMap:
74+
m_Texture: {fileID: 0}
75+
m_Scale: {x: 1, y: 1}
76+
m_Offset: {x: 0, y: 0}
77+
- _ParallaxMap:
78+
m_Texture: {fileID: 0}
79+
m_Scale: {x: 1, y: 1}
80+
m_Offset: {x: 0, y: 0}
81+
- _SpecGlossMap:
82+
m_Texture: {fileID: 0}
83+
m_Scale: {x: 1, y: 1}
84+
m_Offset: {x: 0, y: 0}
85+
- unity_Lightmaps:
86+
m_Texture: {fileID: 0}
87+
m_Scale: {x: 1, y: 1}
88+
m_Offset: {x: 0, y: 0}
89+
- unity_LightmapsInd:
90+
m_Texture: {fileID: 0}
91+
m_Scale: {x: 1, y: 1}
92+
m_Offset: {x: 0, y: 0}
93+
- unity_ShadowMasks:
94+
m_Texture: {fileID: 0}
95+
m_Scale: {x: 1, y: 1}
96+
m_Offset: {x: 0, y: 0}
97+
m_Ints: []
98+
m_Floats:
99+
- _AddPrecomputedVelocity: 0
100+
- _AlphaClip: 0
101+
- _AlphaToMask: 0
102+
- _AtmosphereThickness: 0.5
103+
- _Blend: 0
104+
- _BlendModePreserveSpecular: 1
105+
- _BumpScale: 1
106+
- _ClearCoatMask: 0
107+
- _ClearCoatSmoothness: 0
108+
- _Cull: 2
109+
- _Cutoff: 0.5
110+
- _DetailAlbedoMapScale: 1
111+
- _DetailNormalMapScale: 1
112+
- _DstBlend: 0
113+
- _DstBlendAlpha: 0
114+
- _EnvironmentReflections: 1
115+
- _Exposure: 1.3
116+
- _GlossMapScale: 0
117+
- _Glossiness: 0
118+
- _GlossyReflections: 0
119+
- _Metallic: 0
120+
- _OcclusionStrength: 1
121+
- _Parallax: 0.005
122+
- _QueueOffset: 0
123+
- _ReceiveShadows: 1
124+
- _Smoothness: 0.5
125+
- _SmoothnessTextureChannel: 0
126+
- _SpecularHighlights: 1
127+
- _SrcBlend: 1
128+
- _SrcBlendAlpha: 1
129+
- _SunDisk: 2
130+
- _SunSize: 0.04
131+
- _SunSizeConvergence: 5
132+
- _Surface: 0
133+
- _WorkflowMode: 1
134+
- _ZWrite: 1
135+
m_Colors:
136+
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
137+
- _Color: {r: 1, g: 1, b: 1, a: 1}
138+
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
139+
- _GroundColor: {r: 0, g: 0, b: 0, a: 1}
140+
- _SkyTint: {r: 0.5, g: 0.5, b: 0.5, a: 1}
141+
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
142+
m_BuildTextureStacks: []
143+
m_AllowLocking: 1

0 commit comments

Comments
 (0)