Compare commits

..

No commits in common. 'v2' and 'main' have entirely different histories.
v2 ... main

Binary file not shown.

@ -66,10 +66,12 @@
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\DropdownSample.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\DropdownSample.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\VertexColorCycler.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\VertexColorCycler.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\EnvMapAnimator.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\EnvMapAnimator.cs" />
<Compile Include="Assets\LookAtCamera.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\TMP_TextSelector_A.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\TMP_TextSelector_A.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\Benchmark01_UGUI.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\Benchmark01_UGUI.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\SimpleScript.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\SimpleScript.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\Benchmark04.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\Benchmark04.cs" />
<Compile Include="Assets\Nigga.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\ChatController.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\ChatController.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\ObjectSpin.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\ObjectSpin.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\TMP_PhoneNumberValidator.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\TMP_PhoneNumberValidator.cs" />
@ -93,6 +95,7 @@
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\CameraController.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\CameraController.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\Benchmark03.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\Benchmark03.cs" />
<Compile Include="Assets\NewTextModify.cs" /> <Compile Include="Assets\NewTextModify.cs" />
<Compile Include="Assets\Spawner_Code.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\TMP_TextInfoDebugTool.cs" /> <Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\TMP_TextInfoDebugTool.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -1,35 +1,13 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000 --- !u!1102 &-8900804481672610341
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 12211_Robot_l2
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 6253770010713829114}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &1455923301126016929
AnimatorState: AnimatorState:
serializedVersion: 6 serializedVersion: 6
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: OpenPalm&Point m_Name: Point2
m_Speed: 1 m_Speed: 1
m_CycleOffset: 0 m_CycleOffset: 0
m_Transitions: [] m_Transitions: []
@ -48,14 +26,14 @@ AnimatorState:
m_MirrorParameter: m_MirrorParameter:
m_CycleOffsetParameter: m_CycleOffsetParameter:
m_TimeParameter: m_TimeParameter:
--- !u!1102 &2557972431734937818 --- !u!1102 &-4098386000167556518
AnimatorState: AnimatorState:
serializedVersion: 6 serializedVersion: 6
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: Idle m_Name: Point1
m_Speed: 1 m_Speed: 1
m_CycleOffset: 0 m_CycleOffset: 0
m_Transitions: [] m_Transitions: []
@ -68,39 +46,35 @@ AnimatorState:
m_MirrorParameterActive: 0 m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0 m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0 m_TimeParameterActive: 0
m_Motion: {fileID: 4781951162920444690, guid: 17da3fd4e0129f5449ca3ef38c7c6467, type: 3} m_Motion: {fileID: -1246731831762816583, guid: 17da3fd4e0129f5449ca3ef38c7c6467, type: 3}
m_Tag: m_Tag:
m_SpeedParameter: m_SpeedParameter:
m_MirrorParameter: m_MirrorParameter:
m_CycleOffsetParameter: m_CycleOffsetParameter:
m_TimeParameter: m_TimeParameter:
--- !u!1102 &2788280074804594844 --- !u!91 &9100000
AnimatorState: AnimatorController:
serializedVersion: 6 m_ObjectHideFlags: 0
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: Point m_Name: 12211_Robot_l2
m_Speed: 1 serializedVersion: 5
m_CycleOffset: 0 m_AnimatorParameters: []
m_Transitions: [] m_AnimatorLayers:
m_StateMachineBehaviours: [] - serializedVersion: 5
m_Position: {x: 50, y: 50, z: 0} m_Name: Base Layer
m_IKOnFeet: 0 m_StateMachine: {fileID: 6253770010713829114}
m_WriteDefaultValues: 1 m_Mask: {fileID: 0}
m_Mirror: 0 m_Motions: []
m_SpeedParameterActive: 0 m_Behaviours: []
m_MirrorParameterActive: 0 m_BlendingMode: 0
m_CycleOffsetParameterActive: 0 m_SyncedLayerIndex: -1
m_TimeParameterActive: 0 m_DefaultWeight: 0
m_Motion: {fileID: -1246731831762816583, guid: 17da3fd4e0129f5449ca3ef38c7c6467, type: 3} m_IKPass: 0
m_Tag: m_SyncedLayerAffectsTiming: 0
m_SpeedParameter: m_Controller: {fileID: 9100000}
m_MirrorParameter: --- !u!1102 &1444865627507191996
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &4020121398191267347
AnimatorState: AnimatorState:
serializedVersion: 6 serializedVersion: 6
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -126,14 +100,14 @@ AnimatorState:
m_MirrorParameter: m_MirrorParameter:
m_CycleOffsetParameter: m_CycleOffsetParameter:
m_TimeParameter: m_TimeParameter:
--- !u!1102 &5044872732853706629 --- !u!1102 &1729847278656027416
AnimatorState: AnimatorState:
serializedVersion: 6 serializedVersion: 6
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: OpenPalm m_Name: Idle
m_Speed: 1 m_Speed: 1
m_CycleOffset: 0 m_CycleOffset: 0
m_Transitions: [] m_Transitions: []
@ -146,7 +120,7 @@ AnimatorState:
m_MirrorParameterActive: 0 m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0 m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0 m_TimeParameterActive: 0
m_Motion: {fileID: 4594303134292970328, guid: 17da3fd4e0129f5449ca3ef38c7c6467, type: 3} m_Motion: {fileID: 4781951162920444690, guid: 17da3fd4e0129f5449ca3ef38c7c6467, type: 3}
m_Tag: m_Tag:
m_SpeedParameter: m_SpeedParameter:
m_MirrorParameter: m_MirrorParameter:
@ -162,20 +136,17 @@ AnimatorStateMachine:
m_Name: Base Layer m_Name: Base Layer
m_ChildStates: m_ChildStates:
- serializedVersion: 1 - serializedVersion: 1
m_State: {fileID: 2557972431734937818} m_State: {fileID: 1729847278656027416}
m_Position: {x: 200, y: 0, z: 0} m_Position: {x: 330.9544, y: 152.89932, z: 0}
- serializedVersion: 1
m_State: {fileID: 5044872732853706629}
m_Position: {x: 390, y: 170, z: 0}
- serializedVersion: 1 - serializedVersion: 1
m_State: {fileID: 1455923301126016929} m_State: {fileID: -4098386000167556518}
m_Position: {x: 270, y: 220, z: 0} m_Position: {x: 210, y: 250, z: 0}
- serializedVersion: 1 - serializedVersion: 1
m_State: {fileID: 2788280074804594844} m_State: {fileID: -8900804481672610341}
m_Position: {x: 390, y: 60, z: 0} m_Position: {x: 460, y: 280, z: 0}
- serializedVersion: 1 - serializedVersion: 1
m_State: {fileID: 4020121398191267347} m_State: {fileID: 1444865627507191996}
m_Position: {x: 100, y: 170, z: 0} m_Position: {x: 160, y: 360, z: 0}
m_ChildStateMachines: [] m_ChildStateMachines: []
m_AnyStateTransitions: [] m_AnyStateTransitions: []
m_EntryTransitions: [] m_EntryTransitions: []
@ -185,4 +156,4 @@ AnimatorStateMachine:
m_EntryPosition: {x: 50, y: 120, z: 0} m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0} m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 2557972431734937818} m_DefaultState: {fileID: 1729847278656027416}

@ -11,6 +11,14 @@ public class Operation {
// 2: CloseDoor // 2: CloseDoor
// 3: Delay // 3: Delay
// 4: AddValue // 4: AddValue
// 5: MoveText
}
public class PositionText {
public Vector3 StartPoint;
public Vector3 EndPoint;
public string value;
} }
public class Initalize : MonoBehaviour public class Initalize : MonoBehaviour
@ -18,9 +26,13 @@ public class Initalize : MonoBehaviour
public GameObject[] Boxes; public GameObject[] Boxes;
public DoorAnimation[] Door; public DoorAnimation[] Door;
public NewTextModify[] Label; public NewTextModify[] Label;
public GameObject AllBoxes; public Spawner_Code MoveText;
public Canvas OutputCanvas;
public string UpdateOutputValue;
public GameObject AllBoxes, ParentMoveText, RobotText, RealRobot;
public RobotAnimation RobotA;
public int IndexChange = -1, ActionChange = -1, TimeStop = 0, Accumulator = 0; public int IndexChange = -1, ActionChange = -1, TimeStop = 0, Accumulator = 0;
public bool ActionExisted = false, ActionMoving = false; public bool ActionExisted = false, ActionMoving = false, TextMoving = false, UpdateOutput = false, RobotRotating = false, GonnaRest = false, HoldingText = false, GonnaHoldText = false;
Queue<Operation> AllOperation = new Queue<Operation>(); Queue<Operation> AllOperation = new Queue<Operation>();
public GameObject TextAreaInstruction, TextAreaInput, CompileButton; public GameObject TextAreaInstruction, TextAreaInput, CompileButton;
@ -36,6 +48,9 @@ public class Initalize : MonoBehaviour
void Start() void Start()
{ {
// public string s = DisplayAccumulator.GetComponent<TextMeshProUGUI>(); // public string s = DisplayAccumulator.GetComponent<TextMeshProUGUI>();
OutputCanvas.enabled = false;
RobotA = RealRobot.GetComponent<RobotAnimation>();
MoveText = ParentMoveText.gameObject.transform.GetChild(0).gameObject.GetComponent<Spawner_Code>();
for(int i = 0; i < 100; ++i) { for(int i = 0; i < 100; ++i) {
Boxes[i] = AllBoxes.gameObject.transform.GetChild(i).gameObject; Boxes[i] = AllBoxes.gameObject.transform.GetChild(i).gameObject;
Label[i] = Boxes[i].GetComponent<NewTextModify>(); Label[i] = Boxes[i].GetComponent<NewTextModify>();
@ -50,52 +65,99 @@ public class Initalize : MonoBehaviour
return Op; return Op;
} }
public PositionText Chill(float StartX, float StartY, float StartZ, float EndX, float EndY, float EndZ, string value) {
var PT = new PositionText();
PT.StartPoint = new Vector3(StartX, StartY, StartZ);
PT.EndPoint = new Vector3(EndX, EndY, EndZ);
PT.value = value;
return PT;
}
// Put value from Box into Accumulator // Put value from Box into Accumulator
void Op5(int idx) { void Op5(int idx) {
AllOperation.Enqueue(Cope(idx, 0, 11));
AllOperation.Enqueue(Cope(idx, 0, 1)); AllOperation.Enqueue(Cope(idx, 0, 1));
AllOperation.Enqueue(Cope(idx, FakeBoxes[idx], -1));
AllOperation.Enqueue(Cope(100, 0, 12));
AllOperation.Enqueue(Cope(100, FakeBoxes[idx], -2));
AllOperation.Enqueue(Cope(100, FakeBoxes[idx], 0)); AllOperation.Enqueue(Cope(100, FakeBoxes[idx], 0));
AllOperation.Enqueue(Cope(0, 100, 3));
AllOperation.Enqueue(Cope(idx, 0, 2)); AllOperation.Enqueue(Cope(idx, 0, 2));
AllOperation.Enqueue(Cope(0, 0, 13));
FakeAccumulator = FakeBoxes[idx]; FakeAccumulator = FakeBoxes[idx];
} }
// Put value from Accumulator into Box // Put value from Accumulator into Box
void Op3(int idx) { void Op3(int idx) {
// Code to animate number to fly up from Accumulator // Code to animate number to fly up from Accumulator
AllOperation.Enqueue(Cope(100, 0, 11));
AllOperation.Enqueue(Cope(100, FakeAccumulator, -1));
AllOperation.Enqueue(Cope(idx, 0, 12));
AllOperation.Enqueue(Cope(idx, 0, 1)); AllOperation.Enqueue(Cope(idx, 0, 1));
AllOperation.Enqueue(Cope(idx, FakeAccumulator, -2));
AllOperation.Enqueue(Cope(idx, FakeAccumulator, 0)); AllOperation.Enqueue(Cope(idx, FakeAccumulator, 0));
AllOperation.Enqueue(Cope(0, 100, 3));
AllOperation.Enqueue(Cope(idx, 0, 2)); AllOperation.Enqueue(Cope(idx, 0, 2));
AllOperation.Enqueue(Cope(0, 0, 13));
FakeBoxes[idx] = FakeAccumulator; FakeBoxes[idx] = FakeAccumulator;
} }
// Get value from Box and add into Accumulator // Get value from Box and add into Accumulator
void Op1(int idx) { void Op1(int idx) {
AllOperation.Enqueue(Cope(idx, 0, 11));
AllOperation.Enqueue(Cope(idx, 0, 1)); AllOperation.Enqueue(Cope(idx, 0, 1));
AllOperation.Enqueue(Cope(idx, FakeBoxes[idx], -1));
AllOperation.Enqueue(Cope(100, 0, 12));
AllOperation.Enqueue(Cope(100, FakeBoxes[idx], -2));
AllOperation.Enqueue(Cope(100, FakeBoxes[idx], 4)); AllOperation.Enqueue(Cope(100, FakeBoxes[idx], 4));
AllOperation.Enqueue(Cope(0, 100, 3));
AllOperation.Enqueue(Cope(idx, 0, 2)); AllOperation.Enqueue(Cope(idx, 0, 2));
AllOperation.Enqueue(Cope(0, 0, 13));
FakeAccumulator += FakeBoxes[idx]; FakeAccumulator += FakeBoxes[idx];
} }
// Get value from Box and subtract from Accumulator // Get value from Box and subtract from Accumulator
void Op2(int idx) { void Op2(int idx) {
AllOperation.Enqueue(Cope(idx, 0, 11));
AllOperation.Enqueue(Cope(idx, 0, 1)); AllOperation.Enqueue(Cope(idx, 0, 1));
AllOperation.Enqueue(Cope(idx, FakeBoxes[idx], -1));
AllOperation.Enqueue(Cope(100, 0, 12));
AllOperation.Enqueue(Cope(100, FakeBoxes[idx], -2));
AllOperation.Enqueue(Cope(100, -FakeBoxes[idx], 4)); AllOperation.Enqueue(Cope(100, -FakeBoxes[idx], 4));
AllOperation.Enqueue(Cope(0, 100, 3));
AllOperation.Enqueue(Cope(idx, 0, 2)); AllOperation.Enqueue(Cope(idx, 0, 2));
AllOperation.Enqueue(Cope(0, 0, 13));
FakeAccumulator -= FakeBoxes[idx]; FakeAccumulator -= FakeBoxes[idx];
} }
void Op901() { void Op901() {
// Code to summon number from Input Bracket // Code to summon number from Input Bracket
AllOperation.Enqueue(Cope(100, AllInput.Peek(), 0)); int value = AllInput.Peek();
FakeAccumulator = AllInput.Peek(); AllInput.Dequeue();
AllOperation.Enqueue(Cope(102, value, -3));
AllOperation.Enqueue(Cope(102, 0, 11));
AllOperation.Enqueue(Cope(102, value, -1));
AllOperation.Enqueue(Cope(100, 0, 12));
AllOperation.Enqueue(Cope(100, value, -2));
AllOperation.Enqueue(Cope(100, value, 0));
AllOperation.Enqueue(Cope(0, 0, 13));
FakeAccumulator = value; AllInput.Dequeue();
} }
void Op902() { void Op902() {
// Code to summon number from Accumulator // Code to summon number from Accumulator
AllOperation.Enqueue(Cope(100, 0, 11));
AllOperation.Enqueue(Cope(100, FakeAccumulator, -1));
AllOperation.Enqueue(Cope(101, 0, 12));
AllOperation.Enqueue(Cope(101, FakeAccumulator, -2));
AllOperation.Enqueue(Cope(101, FakeAccumulator, 0)); AllOperation.Enqueue(Cope(101, FakeAccumulator, 0));
AllOperation.Enqueue(Cope(0, 0, 13));
// Output = FakeAccumulator; // Output = FakeAccumulator;
} }
@ -103,7 +165,6 @@ public class Initalize : MonoBehaviour
void UpdateValue(int idx, int value) { void UpdateValue(int idx, int value) {
AllOperation.Enqueue(Cope(idx, 0, 1)); AllOperation.Enqueue(Cope(idx, 0, 1));
AllOperation.Enqueue(Cope(idx, value, 0)); AllOperation.Enqueue(Cope(idx, value, 0));
AllOperation.Enqueue(Cope(0, 100, 3));
AllOperation.Enqueue(Cope(idx, 0, 2)); AllOperation.Enqueue(Cope(idx, 0, 2));
FakeBoxes[idx] = value; FakeBoxes[idx] = value;
} }
@ -125,6 +186,7 @@ public class Initalize : MonoBehaviour
TextAreaInstruction.gameObject.SetActive(false); TextAreaInstruction.gameObject.SetActive(false);
CompileButton.gameObject.SetActive(false); CompileButton.gameObject.SetActive(false);
TextAreaInput.gameObject.SetActive(false); TextAreaInput.gameObject.SetActive(false);
OutputCanvas.enabled = true;
int InputLength = InputText.Length; int InputLength = InputText.Length;
for(int i = 0; i < InputLength; ++i) { for(int i = 0; i < InputLength; ++i) {
@ -187,6 +249,19 @@ public class Initalize : MonoBehaviour
} }
} }
Vector3 GetPositionBox(int idx) {
if(idx < 100) return new Vector3(12 * (idx % 10) + 6, 12 * (idx / 10) + 6, -12);
else if(idx == 100) return new Vector3(137f, 49.1f, -40.4f);
else if(idx == 102) return new Vector3(0.2f, 4.1f, -32.5f);
else if(idx == 101) return new Vector3(-0.3f, 4.1f, -49.6f);
return new Vector3(0f, 0f, 0f);
}
Vector3 GetRobotHand() {
Debug.Log(RealRobot.transform.rotation.eulerAngles);
return RobotText.transform.position;
}
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
@ -195,6 +270,10 @@ public class Initalize : MonoBehaviour
TimeStop -= 1; TimeStop -= 1;
return; return;
} }
if(HoldingText) {
Vector3 HandPosition = GetRobotHand();
MoveText.Clone.transform.position = HandPosition;
}
if(ActionExisted) { if(ActionExisted) {
if(!Door[IndexChange].DoorIsMoving) { if(!Door[IndexChange].DoorIsMoving) {
if(ActionChange == 1) Door[IndexChange].OpenDoor(); if(ActionChange == 1) Door[IndexChange].OpenDoor();
@ -206,6 +285,24 @@ public class Initalize : MonoBehaviour
ActionChange = -1; ActionChange = -1;
} }
} }
else if(TextMoving) {
TextMoving = MoveText.Moving;
if(!TextMoving && UpdateOutput) {
UpdateOutput = false;
OutputCanvas.gameObject.transform.GetChild(0).gameObject.GetComponent<TextMeshProUGUI>().text += UpdateOutputValue;
}
if(!TextMoving && GonnaHoldText) {
GonnaHoldText = false;
HoldingText = true;
}
}
else if(RobotRotating) {
if(RobotA.turning == 0) {
RobotRotating = false;
if(HoldingText)
HoldingText = false;
}
}
else { else {
if(AllOperation.Count == 0) return; if(AllOperation.Count == 0) return;
var Current = AllOperation.Peek(); AllOperation.Dequeue(); var Current = AllOperation.Peek(); AllOperation.Dequeue();
@ -231,15 +328,51 @@ public class Initalize : MonoBehaviour
else if(Current.op == 3) { else if(Current.op == 3) {
TimeStop = Current.val; TimeStop = Current.val;
} }
else { else if(Current.op == -1) {
int idx = Current.idx;
Vector3 EndPoint = GetRobotHand();
string value = Current.val.ToString();
MoveText.Change(GetPositionBox(idx), EndPoint, value);
TextMoving = true; GonnaHoldText = true;
}
else if(Current.op == -2) {
int idx = Current.idx;
Vector3 StartPoint = GetRobotHand();
string value = Current.val.ToString();
MoveText.Change(StartPoint, GetPositionBox(idx), value);
MoveText.OffSoon = true;
TextMoving = true;
if(idx == 101) {
UpdateOutput = true;
UpdateOutputValue = "\n" + value;
}
}
else if(Current.op == -3) {
int idx = Current.idx;
string value = Current.val.ToString();
Vector3 EndPoint = GetPositionBox(102);
Vector3 StartPoint = new Vector3(EndPoint.x, EndPoint.y + 100, EndPoint.z);
MoveText.Change(StartPoint, EndPoint, value);
TextMoving = true;
}
else if(Current.op == 11) {
Vector3 PointingPosition = GetPositionBox(Current.idx);
RobotA.point1(PointingPosition.x, PointingPosition.z);
RobotRotating = true;
}
else if(Current.op == 12) {
Vector3 PointingPosition = GetPositionBox(Current.idx);
RobotA.point2(PointingPosition.x, PointingPosition.z);
RobotRotating = true;
}
else if(Current.op == 13) {
RobotA.rest(); RobotRotating = true;
}
else if(Current.op == 1 || Current.op == 2) {
ActionExisted = true; ActionExisted = true;
IndexChange = Current.idx; IndexChange = Current.idx;
ActionChange = Current.op; ActionChange = Current.op;
} }
} }
} }
void LateUpdate() {
}
} }

@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class LookAtCamera : MonoBehaviour
{
// Start is called before the first frame update
public GameObject Ok;
void Start()
{
Ok.transform.LookAt(Camera.main.transform);
Ok.transform.Rotate(0, 180, 0);
}
// Update is called once per frame
void Update()
{
Ok.transform.LookAt(Camera.main.transform);
Ok.transform.Rotate(0, 180, 0);
}
}

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6a62c35f56408ce4882c00a564ceb42d guid: da47d6c1b5b58d444859859535f480c2
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

@ -1,83 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Texture
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
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: 2800000, guid: 34f6a94ffd906414baab13a5f3d16a2d, type: 3}
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_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 6529406c6e57b4042a638f289d164444
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

@ -6,8 +6,8 @@ public class RobotAnimation : MonoBehaviour
{ {
public GameObject Robot; public GameObject Robot;
public Animator robotanimation; public Animator robotanimation;
public int turning, pending, type, timer; public int turning, pending, type;
public float angle, curang,lmao; public float angle, curang, lmao, speed=25f;
float calc(float desire) float calc(float desire)
{ {
@ -16,53 +16,44 @@ public class RobotAnimation : MonoBehaviour
else return 360F - (desire - curang); else return 360F - (desire - curang);
} }
void point(float x, float z, int pend) public void point1(float x, float z)
{ {
float radians = Mathf.Atan((Robot.transform.position.x - x) / (Robot.transform.position.z - z)); float radians = Mathf.Atan((Robot.transform.position.x - x) / (Robot.transform.position.z - z));
float angl = calc(radians * (180 / Mathf.PI)) / 100F; float angl = calc(radians * (180 / Mathf.PI)) / speed;
turning = 100; turning = (int)speed;
pending = 100 + pend; pending = (int)1;
angle = angl; angle = angl;
type = 0; type = 0;
} }
void palm(int pend) public void point2(float x,float z)
{
pending = 1 + pend;
type = 1;
}
void palmnpoint(float x, float z, int pend)
{ {
float radians = Mathf.Atan((Robot.transform.position.x - x) / (Robot.transform.position.z - z)); float radians = Mathf.Atan((Robot.transform.position.x - x) / (Robot.transform.position.z - z));
float angl = calc(radians * (180 / Mathf.PI)) / 100F; float angl = calc(radians * (180 / Mathf.PI)) / speed;
turning = 100; turning = (int)speed;
pending = 100 + pend; pending = (int)1;
angle = angl; angle = angl;
type = 2; type = 1;
} }
void rest(int pend) public void rest()
{ {
float angl = calc(0) / 100F; float angl = calc(0) / speed;
turning = 100; turning = (int)speed;
pending = 100 + pend; pending = (int)1;
angle = angl; angle = angl;
type = 3; type = 2;
} }
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
robotanimation = GetComponent<Animator>(); robotanimation = GetComponent<Animator>();
point(24, 0, 0);
} }
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
timer++;
if (timer == 300) palm(0);
if (turning > 0) if (turning > 0)
{ {
turning--; turning--;
@ -74,16 +65,15 @@ public class RobotAnimation : MonoBehaviour
pending--; pending--;
if (pending == 0) if (pending == 0)
{ {
if (type == 0) robotanimation.Play("Point"); if (type == 0) robotanimation.Play("Point1");
else if (type == 1) robotanimation.Play("OpenPalm"); else if (type == 1) robotanimation.Play("Point2");
else if (type == 2) robotanimation.Play("OpenPalm&Point"); else if (type == 2)
else if (type == 3)
{ {
robotanimation.Play("Rest"); robotanimation.Play("Rest");
pending = 30; pending = 100;
type = 4; type = 3;
} }
else if (type == 4) robotanimation.Play("Idle"); else if (type == 3) robotanimation.Play("Idle");
} }
} }
} }

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3ff8ecee6a43f2c47a75cc4793a16f31
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

@ -0,0 +1,48 @@
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class Spawner_Code : MonoBehaviour
{
public Canvas Canva;
public GameObject Clone;
public TextMeshProUGUI Number;
public float Speed = 20;
public Vector3 StartPoint, EndPoint;
public bool Moving = false, OffSoon = false;
public void Start()
{
Speed = 20;
Clone.transform.position = StartPoint;
Canva.enabled = false;
}
public void Change(Vector3 StartInput, Vector3 EndInput, string value)
{
Moving = true;
Number.SetText(value);
Clone.transform.position = StartInput;
StartPoint = StartInput;
EndPoint = EndInput;
}
void Update()
{
if (Moving)
{
Canva.enabled = true;
if (Clone.transform.position != EndPoint)
{
Clone.transform.position = Vector3.MoveTowards(Clone.transform.position, EndPoint, Speed * Time.deltaTime);
}
else
{
Moving = false;
if(OffSoon) {
OffSoon = false;
Canva.enabled = false;
}
}
}
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b70bdf6c06a1f964299d65114cad0037
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

@ -41,8 +41,8 @@ ModelImporter:
name: Idle name: Idle
takeName: Armature|ArmatureAction takeName: Armature|ArmatureAction
internalID: 4781951162920444690 internalID: 4781951162920444690
firstFrame: 1 firstFrame: 4
lastFrame: 40 lastFrame: 36
wrapMode: 0 wrapMode: 0
orientationOffsetY: 0 orientationOffsetY: 0
level: 0 level: 0
@ -67,39 +67,10 @@ ModelImporter:
maskSource: {instanceID: 0} maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0 additiveReferencePoseFrame: 0
- serializedVersion: 16 - serializedVersion: 16
name: Point name: Point1
takeName: Armature|ArmatureAction takeName: Armature|ArmatureAction
internalID: -1246731831762816583 internalID: -1246731831762816583
firstFrame: 41 firstFrame: 41
lastFrame: 100
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 0
loopBlend: 0
loopBlendOrientation: 0
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionXZ: 0
heightFromFeet: 0
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
- serializedVersion: 16
name: OpenPalm
takeName: Armature|ArmatureAction
internalID: 4594303134292970328
firstFrame: 101
lastFrame: 160 lastFrame: 160
wrapMode: 0 wrapMode: 0
orientationOffsetY: 0 orientationOffsetY: 0
@ -125,7 +96,7 @@ ModelImporter:
maskSource: {instanceID: 0} maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0 additiveReferencePoseFrame: 0
- serializedVersion: 16 - serializedVersion: 16
name: OpenPalm&Point name: Point2
takeName: Armature|ArmatureAction takeName: Armature|ArmatureAction
internalID: 3696890337287820257 internalID: 3696890337287820257
firstFrame: 161 firstFrame: 161

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save