Compare commits

...

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

Binary file not shown.

@ -66,12 +66,10 @@
<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\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\Benchmark01_UGUI.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\Nigga.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\TMP_PhoneNumberValidator.cs" />
@ -95,7 +93,6 @@
<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\NewTextModify.cs" />
<Compile Include="Assets\Spawner_Code.cs" />
<Compile Include="Assets\TextMesh Pro\Examples &amp; Extras\Scripts\TMP_TextInfoDebugTool.cs" />
</ItemGroup>
<ItemGroup>

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

@ -11,14 +11,6 @@ public class Operation {
// 2: CloseDoor
// 3: Delay
// 4: AddValue
// 5: MoveText
}
public class PositionText {
public Vector3 StartPoint;
public Vector3 EndPoint;
public string value;
}
public class Initalize : MonoBehaviour
@ -26,13 +18,9 @@ public class Initalize : MonoBehaviour
public GameObject[] Boxes;
public DoorAnimation[] Door;
public NewTextModify[] Label;
public Spawner_Code MoveText;
public Canvas OutputCanvas;
public string UpdateOutputValue;
public GameObject AllBoxes, ParentMoveText, RobotText, RealRobot;
public RobotAnimation RobotA;
public GameObject AllBoxes;
public int IndexChange = -1, ActionChange = -1, TimeStop = 0, Accumulator = 0;
public bool ActionExisted = false, ActionMoving = false, TextMoving = false, UpdateOutput = false, RobotRotating = false, GonnaRest = false, HoldingText = false, GonnaHoldText = false;
public bool ActionExisted = false, ActionMoving = false;
Queue<Operation> AllOperation = new Queue<Operation>();
public GameObject TextAreaInstruction, TextAreaInput, CompileButton;
@ -48,9 +36,6 @@ public class Initalize : MonoBehaviour
void Start()
{
// 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) {
Boxes[i] = AllBoxes.gameObject.transform.GetChild(i).gameObject;
Label[i] = Boxes[i].GetComponent<NewTextModify>();
@ -65,99 +50,52 @@ public class Initalize : MonoBehaviour
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
void Op5(int idx) {
AllOperation.Enqueue(Cope(idx, 0, 11));
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(idx, 0, 1));
AllOperation.Enqueue(Cope(100, FakeBoxes[idx], 0));
AllOperation.Enqueue(Cope(0, 100, 3));
AllOperation.Enqueue(Cope(idx, 0, 2));
AllOperation.Enqueue(Cope(0, 0, 13));
FakeAccumulator = FakeBoxes[idx];
}
// Put value from Accumulator into Box
void Op3(int idx) {
// 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, FakeAccumulator, -2));
AllOperation.Enqueue(Cope(idx, 0, 1));
AllOperation.Enqueue(Cope(idx, FakeAccumulator, 0));
AllOperation.Enqueue(Cope(0, 100, 3));
AllOperation.Enqueue(Cope(idx, 0, 2));
AllOperation.Enqueue(Cope(0, 0, 13));
FakeBoxes[idx] = FakeAccumulator;
}
// Get value from Box and add into Accumulator
void Op1(int idx) {
AllOperation.Enqueue(Cope(idx, 0, 11));
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(idx, 0, 1));
AllOperation.Enqueue(Cope(100, FakeBoxes[idx], 4));
AllOperation.Enqueue(Cope(0, 100, 3));
AllOperation.Enqueue(Cope(idx, 0, 2));
AllOperation.Enqueue(Cope(0, 0, 13));
FakeAccumulator += FakeBoxes[idx];
}
// Get value from Box and subtract from Accumulator
void Op2(int idx) {
AllOperation.Enqueue(Cope(idx, 0, 11));
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(idx, 0, 1));
AllOperation.Enqueue(Cope(100, -FakeBoxes[idx], 4));
AllOperation.Enqueue(Cope(0, 100, 3));
AllOperation.Enqueue(Cope(idx, 0, 2));
AllOperation.Enqueue(Cope(0, 0, 13));
FakeAccumulator -= FakeBoxes[idx];
}
void Op901() {
// Code to summon number from Input Bracket
int value = AllInput.Peek();
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();
AllOperation.Enqueue(Cope(100, AllInput.Peek(), 0));
FakeAccumulator = AllInput.Peek(); AllInput.Dequeue();
}
void Op902() {
// 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(0, 0, 13));
// Output = FakeAccumulator;
}
@ -165,12 +103,13 @@ public class Initalize : MonoBehaviour
void UpdateValue(int idx, int value) {
AllOperation.Enqueue(Cope(idx, 0, 1));
AllOperation.Enqueue(Cope(idx, value, 0));
AllOperation.Enqueue(Cope(0, 100, 3));
AllOperation.Enqueue(Cope(idx, 0, 2));
FakeBoxes[idx] = value;
}
void CompileError() {
}
bool CheckDigit(char c) {
@ -186,7 +125,6 @@ public class Initalize : MonoBehaviour
TextAreaInstruction.gameObject.SetActive(false);
CompileButton.gameObject.SetActive(false);
TextAreaInput.gameObject.SetActive(false);
OutputCanvas.enabled = true;
int InputLength = InputText.Length;
for(int i = 0; i < InputLength; ++i) {
@ -249,19 +187,6 @@ 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
void Update()
{
@ -270,10 +195,6 @@ public class Initalize : MonoBehaviour
TimeStop -= 1;
return;
}
if(HoldingText) {
Vector3 HandPosition = GetRobotHand();
MoveText.Clone.transform.position = HandPosition;
}
if(ActionExisted) {
if(!Door[IndexChange].DoorIsMoving) {
if(ActionChange == 1) Door[IndexChange].OpenDoor();
@ -285,24 +206,6 @@ public class Initalize : MonoBehaviour
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 {
if(AllOperation.Count == 0) return;
var Current = AllOperation.Peek(); AllOperation.Dequeue();
@ -328,51 +231,15 @@ public class Initalize : MonoBehaviour
else if(Current.op == 3) {
TimeStop = Current.val;
}
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) {
else {
ActionExisted = true;
IndexChange = Current.idx;
ActionChange = Current.op;
}
}
}
void LateUpdate() {
}
}

@ -1,22 +0,0 @@
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,11 +0,0 @@
fileFormatVersion: 2
guid: da47d6c1b5b58d444859859535f480c2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,83 @@
%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: []

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

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

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

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

File diff suppressed because it is too large Load Diff

@ -1,48 +0,0 @@
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;
}
}
}
}
}

File diff suppressed because one or more lines are too long

@ -41,8 +41,8 @@ ModelImporter:
name: Idle
takeName: Armature|ArmatureAction
internalID: 4781951162920444690
firstFrame: 4
lastFrame: 36
firstFrame: 1
lastFrame: 40
wrapMode: 0
orientationOffsetY: 0
level: 0
@ -67,10 +67,39 @@ ModelImporter:
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
- serializedVersion: 16
name: Point1
name: Point
takeName: Armature|ArmatureAction
internalID: -1246731831762816583
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
wrapMode: 0
orientationOffsetY: 0
@ -96,7 +125,7 @@ ModelImporter:
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
- serializedVersion: 16
name: Point2
name: OpenPalm&Point
takeName: Armature|ArmatureAction
internalID: 3696890337287820257
firstFrame: 161

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 B

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

Loading…
Cancel
Save