mirror of
https://github.com/ConjureETS/PixelSphinx.git
synced 2026-03-24 02:20:58 +00:00
Forced text meta files
This commit is contained in:
parent
34f4bf3a46
commit
7e82a2b543
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -40,10 +40,10 @@ public class Astronaut : MonoBehaviour {
|
|||||||
SpriteDash.SetActive(false);
|
SpriteDash.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_state == AstronautState.Walking)
|
/*if (_state == AstronautState.Walking)
|
||||||
{
|
{
|
||||||
StartCoroutine(WalkingStance());
|
StartCoroutine(WalkingStance());
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +51,6 @@ public class Astronaut : MonoBehaviour {
|
|||||||
private float height = 0;
|
private float height = 0;
|
||||||
private float angle = 0;
|
private float angle = 0;
|
||||||
private float walkTime = 0;
|
private float walkTime = 0;
|
||||||
|
|
||||||
private int nextStep = 1;
|
private int nextStep = 1;
|
||||||
|
|
||||||
// Use this for initialization
|
// Use this for initialization
|
||||||
@ -62,6 +61,15 @@ public class Astronaut : MonoBehaviour {
|
|||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update () {
|
void Update () {
|
||||||
|
|
||||||
|
/*if (State == AstronautState.Walking)
|
||||||
|
{
|
||||||
|
walkTime += Time.deltaTime / StepTime;
|
||||||
|
Vector3 rotation = transform.rotation.eulerAngles;
|
||||||
|
rotation.z = Mathf.Sin(walkTime * Mathf.PI)*50;
|
||||||
|
transform.rotation = Quaternion.Euler(rotation);
|
||||||
|
Debug.Log(rotation.z);
|
||||||
|
}*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
switch (State)
|
switch (State)
|
||||||
{
|
{
|
||||||
@ -97,8 +105,8 @@ public class Astronaut : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("walking");
|
|
||||||
State = AstronautState.Walking;
|
State = AstronautState.Walking;
|
||||||
|
walkTime = 0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,7 +129,7 @@ public class Astronaut : MonoBehaviour {
|
|||||||
Debug.Log("Clicked the button with an image");
|
Debug.Log("Clicked the button with an image");
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator WalkingStance()
|
/*IEnumerator WalkingStance()
|
||||||
{
|
{
|
||||||
Debug.Log("walking stance");
|
Debug.Log("walking stance");
|
||||||
walkTime += Time.deltaTime / StepTime;
|
walkTime += Time.deltaTime / StepTime;
|
||||||
@ -133,10 +141,10 @@ public class Astronaut : MonoBehaviour {
|
|||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*walkTime = 0f;
|
walkTime = 0f;
|
||||||
if(State == AstronautState.Walking)
|
if(State == AstronautState.Walking)
|
||||||
{
|
{
|
||||||
StartCoroutine("WalkingStance");
|
StartCoroutine("WalkingStance");
|
||||||
|
}
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
16
Assets/Scripts/PlanetUtilities.cs
Normal file
16
Assets/Scripts/PlanetUtilities.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
public class PlanetUtilities {
|
||||||
|
|
||||||
|
public static void Spheric2Cartesian(float theta, float radius, out float x, out float y)
|
||||||
|
{
|
||||||
|
x = -radius * Mathf.Sin(Mathf.Deg2Rad * theta);
|
||||||
|
y = radius * Mathf.Cos(Mathf.Deg2Rad * theta);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static float GetDisplacementAngle(float delta, float radius)
|
||||||
|
{
|
||||||
|
return Mathf.Rad2Deg * radius / delta;
|
||||||
|
}
|
||||||
|
}
|
||||||
12
Assets/Scripts/PlanetUtilities.cs.meta
Normal file
12
Assets/Scripts/PlanetUtilities.cs.meta
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8f6095fa026be7947a9f7d253ee7e848
|
||||||
|
timeCreated: 1460114132
|
||||||
|
licenseType: Free
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user