mirror of
https://github.com/ConjureETS/PixelSphinx.git
synced 2026-03-24 02:20:58 +00:00
merge
This commit is contained in:
parent
f6269e20bb
commit
2d63fef4a0
@ -57,8 +57,9 @@ GameObject:
|
|||||||
- 4: {fileID: 403646}
|
- 4: {fileID: 403646}
|
||||||
- 114: {fileID: 11494368}
|
- 114: {fileID: 11494368}
|
||||||
- 114: {fileID: 11434752}
|
- 114: {fileID: 11434752}
|
||||||
- 54: {fileID: 5402556}
|
|
||||||
- 136: {fileID: 13683032}
|
- 136: {fileID: 13683032}
|
||||||
|
- 54: {fileID: 5462614}
|
||||||
|
- 136: {fileID: 13672180}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Character
|
m_Name: Character
|
||||||
m_TagString: Player
|
m_TagString: Player
|
||||||
@ -117,7 +118,7 @@ Transform:
|
|||||||
- {fileID: 403646}
|
- {fileID: 403646}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
--- !u!54 &5402556
|
--- !u!54 &5462614
|
||||||
Rigidbody:
|
Rigidbody:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
@ -130,7 +131,7 @@ Rigidbody:
|
|||||||
m_UseGravity: 0
|
m_UseGravity: 0
|
||||||
m_IsKinematic: 0
|
m_IsKinematic: 0
|
||||||
m_Interpolate: 0
|
m_Interpolate: 0
|
||||||
m_Constraints: 0
|
m_Constraints: 120
|
||||||
m_CollisionDetection: 0
|
m_CollisionDetection: 0
|
||||||
--- !u!114 &11434752
|
--- !u!114 &11434752
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -164,7 +165,21 @@ MonoBehaviour:
|
|||||||
JumpSpeed: 5
|
JumpSpeed: 5
|
||||||
Gravity: 15
|
Gravity: 15
|
||||||
Speed: 5
|
Speed: 5
|
||||||
|
EjectSpeed: 20
|
||||||
planet: {fileID: 0}
|
planet: {fileID: 0}
|
||||||
|
--- !u!136 &13672180
|
||||||
|
CapsuleCollider:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 170392}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Radius: 0.77
|
||||||
|
m_Height: 3.37
|
||||||
|
m_Direction: 1
|
||||||
|
m_Center: {x: -0.03, y: 0.35, z: 0}
|
||||||
--- !u!136 &13683032
|
--- !u!136 &13683032
|
||||||
CapsuleCollider:
|
CapsuleCollider:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
|
|||||||
@ -18,15 +18,13 @@ public class Asteroid : MonoBehaviour
|
|||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
speed = Random.Range(1.8F, 3F);
|
speed = Random.Range(1.8F, 3F);
|
||||||
// print(speed);
|
|
||||||
center = new Vector3(0, 0);
|
center = new Vector3(0, 0);
|
||||||
|
|
||||||
|
|
||||||
if (RandomRotationSpeed)
|
if (RandomRotationSpeed)
|
||||||
rotationSpeed = 10 * UnityEngine.Random.Range(0.25f, 5f);
|
rotationSpeed = 10 * UnityEngine.Random.Range(0.25f, 5f);
|
||||||
|
|
||||||
rotationDirection = (Mathf.Floor(UnityEngine.Random.Range(0.0f, 1.99f))*2 - 1);
|
rotationDirection = (Mathf.Floor(UnityEngine.Random.Range(0.0f, 1.99f)) * 2 - 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
|
|||||||
@ -68,10 +68,11 @@ public class AsteroidSpawner : TimerFunctionsClass
|
|||||||
var angle = ( 360.0f + (((playerTheta * 180)) / Mathf.PI)) % 360; ///TODO : a changer pour p.theta
|
var angle = ( 360.0f + (((playerTheta * 180)) / Mathf.PI)) % 360; ///TODO : a changer pour p.theta
|
||||||
print("angle:" + angle);
|
print("angle:" + angle);
|
||||||
|
|
||||||
var AsteroidType = Mathf.RoundToInt(Mathf.Floor(UnityEngine.Random.Range(0f, 3.999f)));
|
var AsteroidType = Mathf.RoundToInt(Mathf.Floor(UnityEngine.Random.Range(0f, 3.999f)));
|
||||||
|
float direction = (Mathf.Floor(UnityEngine.Random.Range(0.0f, 1.99f)) * 2 - 1);
|
||||||
|
|
||||||
Instantiate(AsteroidPrefabTypes[AsteroidType],
|
Instantiate(AsteroidPrefabTypes[AsteroidType],
|
||||||
planet.GetPlanetCoordinatesFromPlayerXY(angle, UnityEngine.Random.Range(10f,15f)),
|
direction*planet.GetPlanetCoordinatesFromPlayerXY(angle, UnityEngine.Random.Range(10f,15f)),
|
||||||
Quaternion.identity);
|
Quaternion.identity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,15 +1,17 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
|
[RequireComponent(typeof(AstronautAnimator))]
|
||||||
public class Astronaut : MonoBehaviour {
|
public class Astronaut : MonoBehaviour {
|
||||||
|
|
||||||
private enum AstronautState
|
private AstronautAnimator _astronautAnimator;
|
||||||
|
public enum AstronautState
|
||||||
{
|
{
|
||||||
Idle, Walking, Jumping, Dashing, Ejecting, Dead
|
Idle, Walking, Jumping, Dashing, Ejecting, Dead
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameObject Rotator;
|
public GameObject Rotator;
|
||||||
public GameObject SpriteWalk;
|
public SpriteRenderer SpriteWalk;
|
||||||
public GameObject SpriteDash;
|
public GameObject SpriteDash;
|
||||||
|
|
||||||
public float Width;
|
public float Width;
|
||||||
@ -19,11 +21,13 @@ public class Astronaut : MonoBehaviour {
|
|||||||
public float JumpSpeed;
|
public float JumpSpeed;
|
||||||
public float Gravity;
|
public float Gravity;
|
||||||
public float Speed;
|
public float Speed;
|
||||||
|
public float EjectSpeed;
|
||||||
|
//public float DashSpeed;
|
||||||
|
|
||||||
public PlanetManager planet;
|
public PlanetManager planet;
|
||||||
|
|
||||||
private AstronautState _state;
|
private AstronautState _state;
|
||||||
private AstronautState State
|
public AstronautState State
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -37,19 +41,20 @@ public class Astronaut : MonoBehaviour {
|
|||||||
if (oldState == _state) return;
|
if (oldState == _state) return;
|
||||||
|
|
||||||
if (oldState == AstronautState.Dashing)
|
if (oldState == AstronautState.Dashing)
|
||||||
{
|
{
|
||||||
SpriteWalk.SetActive(false);
|
SpriteWalk.gameObject.SetActive(false);
|
||||||
SpriteDash.SetActive(true);
|
SpriteDash.gameObject.SetActive(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SpriteWalk.SetActive(true);
|
SpriteWalk.gameObject.SetActive(true);
|
||||||
SpriteDash.SetActive(false);
|
SpriteDash.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (_state == AstronautState.Walking)
|
/*if (_state == AstronautState.Walking)
|
||||||
{
|
{
|
||||||
StartCoroutine(WalkingStance());
|
//StartCoroutine(WalkingStance());
|
||||||
|
_astronautAnimator.Walk();
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -62,12 +67,18 @@ public class Astronaut : MonoBehaviour {
|
|||||||
private float walkTime = 0;
|
private float walkTime = 0;
|
||||||
private int nextStep = 1;
|
private int nextStep = 1;
|
||||||
|
|
||||||
// Use this for initialization
|
// Use this for initialization
|
||||||
public void Start () {
|
void Start()
|
||||||
|
{
|
||||||
|
_astronautAnimator = GetComponent<AstronautAnimator>();
|
||||||
|
_astronautAnimator.aspi = this;
|
||||||
|
State = AstronautState.Idle;
|
||||||
|
|
||||||
if (!planet)
|
if (!planet)
|
||||||
{
|
{
|
||||||
planet = FindObjectOfType<PlanetManager>();
|
planet = FindObjectOfType<PlanetManager>();
|
||||||
}
|
}
|
||||||
|
|
||||||
State = AstronautState.Idle;
|
State = AstronautState.Idle;
|
||||||
//Debug.Log(planet.GetPlanetRadius(0));
|
//Debug.Log(planet.GetPlanetRadius(0));
|
||||||
theta = 0;
|
theta = 0;
|
||||||
@ -111,15 +122,27 @@ public class Astronaut : MonoBehaviour {
|
|||||||
if (!grounded)
|
if (!grounded)
|
||||||
{
|
{
|
||||||
height += vSpeed * delta;
|
height += vSpeed * delta;
|
||||||
vSpeed -= Gravity * delta;
|
if (State != AstronautState.Ejecting)
|
||||||
|
vSpeed -= Gravity * delta;
|
||||||
|
else
|
||||||
|
vSpeed *= 0.98f;
|
||||||
}
|
}
|
||||||
|
|
||||||
float radius = GetGroundRadius();
|
float radius = GetGroundRadius();
|
||||||
if (grounded = (height <= radius))
|
if (grounded = (height <= radius))
|
||||||
{
|
{
|
||||||
|
/*if (State == AstronautState.Dashing)
|
||||||
|
{
|
||||||
|
planet.PushWedge(Repeat(theta,360));
|
||||||
|
State = AstronautState.Idle;
|
||||||
|
//TODO_SR Create dash impact here
|
||||||
|
}*/
|
||||||
|
|
||||||
height = radius;
|
height = radius;
|
||||||
if (State == AstronautState.Jumping)
|
if (State == AstronautState.Jumping)
|
||||||
State = AstronautState.Idle;
|
State = AstronautState.Idle;
|
||||||
|
|
||||||
|
vSpeed = 0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdatePosition();
|
UpdatePosition();
|
||||||
@ -135,8 +158,7 @@ public class Astronaut : MonoBehaviour {
|
|||||||
{
|
{
|
||||||
walkTime += Time.deltaTime / StepTime;
|
walkTime += Time.deltaTime / StepTime;
|
||||||
Vector3 rotation = transform.rotation.eulerAngles;
|
Vector3 rotation = transform.rotation.eulerAngles;
|
||||||
rotation.z = Mathf.Sin(walkTime * Mathf.PI)*50;
|
rotation.z = Mathf.Sin(walkTime * Mathf.PI)*50; transform.rotation = Quaternion.Euler(rotation);
|
||||||
transform.rotation = Quaternion.Euler(rotation);
|
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -199,15 +221,20 @@ public class Astronaut : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
if (State == AstronautState.Dashing && grounded)
|
if (State == AstronautState.Dashing && grounded)
|
||||||
{
|
{
|
||||||
//TODO arreter mouvelement lateral
|
//TODO arreter mouvement lateral
|
||||||
State=AstronautState.Idle;
|
State=AstronautState.Idle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Jump()
|
public void Jump()
|
||||||
{
|
{
|
||||||
|
Debug.Log("Jump!");
|
||||||
|
|
||||||
if (State >= AstronautState.Ejecting)
|
if (State >= AstronautState.Ejecting)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
_astronautAnimator.Jump();
|
||||||
|
|
||||||
if (State == AstronautState.Jumping)
|
if (State == AstronautState.Jumping)
|
||||||
{
|
{
|
||||||
Dash();
|
Dash();
|
||||||
@ -215,6 +242,7 @@ public class Astronaut : MonoBehaviour {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!grounded) return;
|
if (!grounded) return;
|
||||||
vSpeed = JumpSpeed;
|
vSpeed = JumpSpeed;
|
||||||
grounded = false;
|
grounded = false;
|
||||||
@ -225,13 +253,23 @@ public class Astronaut : MonoBehaviour {
|
|||||||
{
|
{
|
||||||
|
|
||||||
if (Time.time < DashTime + lastDashTime)
|
if (Time.time < DashTime + lastDashTime)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_state >= AstronautState.Ejecting)
|
if (State >= AstronautState.Ejecting)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lastDashTime = Time.time;
|
lastDashTime = Time.time;
|
||||||
planet.PushWedge(this.theta);
|
planet.PushWedge(this.theta);
|
||||||
|
|
||||||
|
//State = AstronautState.Dashing;
|
||||||
|
//vSpeed = -DashSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Eject()
|
||||||
|
{
|
||||||
|
State = AstronautState.Ejecting;
|
||||||
|
vSpeed = EjectSpeed;
|
||||||
|
grounded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -242,31 +280,12 @@ public class Astronaut : MonoBehaviour {
|
|||||||
print("Stunned");
|
print("Stunned");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void OnGUI()
|
public void OnGUI()
|
||||||
{
|
{
|
||||||
if (GUI.Button(new Rect(10, 10, 150, 50), State.ToString()))
|
if (GUI.Button(new Rect(10, 10, 150, 50), State.ToString()))
|
||||||
|
{
|
||||||
Debug.Log("Clicked the button with an image");
|
Debug.Log("Clicked the button with an image");
|
||||||
|
Eject();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*IEnumerator WalkingStance()
|
|
||||||
{
|
|
||||||
Debug.Log("walking stance");
|
|
||||||
walkTime += Time.deltaTime / StepTime;
|
|
||||||
while (State <= AstronautState.Walking || walkTime <= 1f)
|
|
||||||
{
|
|
||||||
Vector3 rotation = transform.rotation.eulerAngles;
|
|
||||||
rotation.z = Mathf.Sin(walkTime*Mathf.PI)*50;
|
|
||||||
// print("rotation " + rotation);
|
|
||||||
transform.rotation = Quaternion.Euler(rotation);
|
|
||||||
yield return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
walkTime = 0f;
|
|
||||||
if(State == AstronautState.Walking)
|
|
||||||
{
|
|
||||||
StartCoroutine("WalkingStance");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|||||||
75
Assets/Scripts/AstronautAnimator.cs
Normal file
75
Assets/Scripts/AstronautAnimator.cs
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
public class AstronautAnimator : MonoBehaviour {
|
||||||
|
|
||||||
|
//init
|
||||||
|
public Astronaut aspi;
|
||||||
|
public float WalkAnimSpeed;
|
||||||
|
public float WalkAnimAngle;
|
||||||
|
public float EjectSpinSpeed;
|
||||||
|
|
||||||
|
// Use this for initialization
|
||||||
|
void Start () {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update () {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Jump()
|
||||||
|
{
|
||||||
|
aspi.SpriteWalk.gameObject.SetActive(false);
|
||||||
|
aspi.SpriteDash.gameObject.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Land()
|
||||||
|
{
|
||||||
|
aspi.SpriteWalk.gameObject.SetActive(true);
|
||||||
|
aspi.SpriteDash.gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Walk()
|
||||||
|
{
|
||||||
|
StartCoroutine(Rotate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Eject()
|
||||||
|
{
|
||||||
|
StartCoroutine(Spin());
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator Spin()
|
||||||
|
{
|
||||||
|
for (float i = 0f; i < 3000f; i += Time.deltaTime * EjectSpinSpeed)
|
||||||
|
{
|
||||||
|
transform.rotation = Quaternion.Euler(0, 0, i);
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator Rotate()
|
||||||
|
{
|
||||||
|
for (float i = 0.5f; i < 2.5f; i+= Time.deltaTime*WalkAnimSpeed)
|
||||||
|
{
|
||||||
|
/*int roundDown = 10;
|
||||||
|
//0.5, 1.5 et 2.5
|
||||||
|
if (Mathf.Floor(i * roundDown) == roundDown || Mathf.Floor(i * roundDown) == 2 * roundDown)
|
||||||
|
{
|
||||||
|
print(i * roundDown + " " + Mathf.Floor(i * roundDown));
|
||||||
|
aspi.SpriteWalk.flipX = !aspi.SpriteWalk.flipX;
|
||||||
|
}*/
|
||||||
|
float position = Mathf.PingPong(i, 1f);
|
||||||
|
transform.rotation = Quaternion.Euler(0, 0, (position - 0.5f) * WalkAnimAngle * 2);
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aspi.State == Astronaut.AstronautState.Walking)
|
||||||
|
{
|
||||||
|
StartCoroutine(Rotate());
|
||||||
|
}
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
12
Assets/Scripts/AstronautAnimator.cs.meta
Normal file
12
Assets/Scripts/AstronautAnimator.cs.meta
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 77462b2431858f84b9bc2d055c2f4d45
|
||||||
|
timeCreated: 1460135550
|
||||||
|
licenseType: Free
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
70
Assets/Scripts/AstronautController2.cs
Normal file
70
Assets/Scripts/AstronautController2.cs
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
using InputHandler;
|
||||||
|
|
||||||
|
[RequireComponent(typeof(Astronaut))]
|
||||||
|
public class AstronautController2 : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
private Astronaut _astronaut;
|
||||||
|
|
||||||
|
public int PlayerNumber;
|
||||||
|
|
||||||
|
// Use this for initialization
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
InputManager.Instance.PushActiveContext("Gameplay", PlayerNumber);
|
||||||
|
InputManager.Instance.AddCallback(PlayerNumber, HandlePlayerAxis);
|
||||||
|
InputManager.Instance.AddCallback(PlayerNumber, HandlePlayerButtons);
|
||||||
|
|
||||||
|
_astronaut = GetComponent<Astronaut>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandlePlayerAxis(MappedInput input)
|
||||||
|
{
|
||||||
|
if (this == null) return;
|
||||||
|
|
||||||
|
// movement
|
||||||
|
|
||||||
|
float xValue = 0f;
|
||||||
|
|
||||||
|
if (input.Ranges.ContainsKey("MoveLeft"))
|
||||||
|
{
|
||||||
|
xValue = -input.Ranges["MoveLeft"];
|
||||||
|
}
|
||||||
|
else if (input.Ranges.ContainsKey("MoveRight"))
|
||||||
|
{
|
||||||
|
xValue = input.Ranges["MoveRight"];
|
||||||
|
}
|
||||||
|
|
||||||
|
float yValue = 0f;
|
||||||
|
|
||||||
|
if (input.Ranges.ContainsKey("MoveUp"))
|
||||||
|
{
|
||||||
|
yValue = input.Ranges["MoveUp"];
|
||||||
|
}
|
||||||
|
else if (input.Ranges.ContainsKey("MoveDown"))
|
||||||
|
{
|
||||||
|
yValue = -input.Ranges["MoveDown"];
|
||||||
|
}
|
||||||
|
|
||||||
|
_astronaut.Move(xValue, yValue);
|
||||||
|
|
||||||
|
if (input.Ranges.ContainsKey("Dash"))
|
||||||
|
{
|
||||||
|
if (input.Ranges["Dash"] > 0.8f)
|
||||||
|
_astronaut.Dash();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandlePlayerButtons(MappedInput input)
|
||||||
|
{
|
||||||
|
if (this == null) return;
|
||||||
|
|
||||||
|
if (input.Actions.Contains("Jump"))
|
||||||
|
{
|
||||||
|
_astronaut.Jump();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
12
Assets/Scripts/AstronautController2.cs.meta
Normal file
12
Assets/Scripts/AstronautController2.cs.meta
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d7792093ffcd687448b5875a8ce0cc32
|
||||||
|
timeCreated: 1460133633
|
||||||
|
licenseType: Free
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -1,250 +1,238 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
public class PlanetManager : MonoBehaviour
|
public class PlanetManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
public int NbCartiers = 10;
|
public int NbCartiers = 10;
|
||||||
public float TailleCartiersEnDegres = 0; //radian -> valeurs 0 a 360
|
public float TailleCartiersEnDegres = 0; //radian -> valeurs 0 a 360
|
||||||
public float CartierResetRatioSpeedFactor = 0.23f; //Entre 0.05 et 1 ou plus on aime que ca restore lentement, randomnly
|
public float CartierResetRatioSpeedFactor = 0.23f; //Entre 0.05 et 1 ou plus on aime que ca restore lentement, randomnly
|
||||||
public bool CartierResetRatioSpeedRandomize = true;
|
public bool CartierResetRatioSpeedRandomize = true;
|
||||||
public bool CartierResetOverTime = true;
|
public bool CartierResetOverTime = true;
|
||||||
public float CartierMinRatio = 0.4f;
|
public float CartierMinRatio = 0.4f;
|
||||||
public float CartierMaxRatio = 2.0f;
|
public float CartierMaxRatio = 2.0f;
|
||||||
public float CartierStepSize = 0.25f;
|
public float CartierStepSize = 0.25f;
|
||||||
public GameObject WedgePrefab = null;
|
public GameObject WedgePrefab = null;
|
||||||
public List<Wedge> wedges = new List<Wedge>();
|
public List<Wedge> wedges = new List<Wedge>();
|
||||||
|
|
||||||
// Use this for initialization
|
// Use this for initialization
|
||||||
public void Awake () {
|
public void Awake () {
|
||||||
TailleCartiersEnDegres = 360.0f / NbCartiers;
|
TailleCartiersEnDegres = 360.0f / NbCartiers;
|
||||||
|
|
||||||
for(int i = 0; i < NbCartiers; i++)
|
for(int i = 0; i < NbCartiers; i++)
|
||||||
{
|
{
|
||||||
float debutAngleTheta = i* TailleCartiersEnDegres;
|
float debutAngleTheta = i* TailleCartiersEnDegres;
|
||||||
var w = new Wedge() {tMin = debutAngleTheta, tMax = debutAngleTheta + TailleCartiersEnDegres};
|
var w = new Wedge() {tMin = debutAngleTheta, tMax = debutAngleTheta + TailleCartiersEnDegres};
|
||||||
|
|
||||||
//float angle = i * Mathf.PI * 2 / NbCartiers * 360;
|
//float angle = i * Mathf.PI * 2 / NbCartiers * 360;
|
||||||
//var wedgePos = GetPlanetCoordinatesFromPlayerXY(debutAngleTheta, 0);
|
//var wedgePos = GetPlanetCoordinatesFromPlayerXY(debutAngleTheta, 0);
|
||||||
// wedgePos.x -= Mathf.Cos(debutAngleTheta * Mathf.PI / 180);
|
// wedgePos.x -= Mathf.Cos(debutAngleTheta * Mathf.PI / 180);
|
||||||
//wedgePos.y -= Mathf.Sin(debutAngleTheta * Mathf.PI / 180);
|
//wedgePos.y -= Mathf.Sin(debutAngleTheta * Mathf.PI / 180);
|
||||||
var obj = Instantiate(WedgePrefab, new Vector3(0.0f,0.0f, 0.0f), Quaternion.Euler(0, 0, debutAngleTheta));
|
var obj = Instantiate(WedgePrefab, new Vector3(0.0f,0.0f, 0.0f), Quaternion.Euler(0, 0, debutAngleTheta));
|
||||||
obj.name = "wedge_" + i;
|
obj.name = "wedge_" + i;
|
||||||
w.sprite = GameObject.Find(obj.name);
|
w.sprite = GameObject.Find(obj.name);
|
||||||
wedges.Add(w); //pushes at end.
|
wedges.Add(w); //pushes at end.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
public void Update () {
|
public void Update () {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FixedUpdate()
|
public void FixedUpdate()
|
||||||
{
|
{
|
||||||
if (!this.CartierResetOverTime) return;
|
if (!this.CartierResetOverTime) return;
|
||||||
//Ramener les plateforme vers leur position initiale 0;
|
//Ramener les plateforme vers leur position initiale 0;
|
||||||
|
|
||||||
foreach (var w in wedges)
|
foreach (var w in wedges)
|
||||||
{
|
{
|
||||||
if (w.offset <= 1.05f && w.offset >= 0.95f)
|
if (w.offset <= 1.05f && w.offset >= 0.95f)
|
||||||
{
|
{
|
||||||
w.offset = 1.0f;
|
w.offset = 1.0f;
|
||||||
}
|
}
|
||||||
else if (w.offset > 1.0f)
|
else if (w.offset > 1.0f)
|
||||||
{
|
{
|
||||||
if (!CartierResetRatioSpeedRandomize)
|
if (!CartierResetRatioSpeedRandomize)
|
||||||
{
|
{
|
||||||
w.offset -= 0.005f*CartierResetRatioSpeedFactor;
|
w.offset -= 0.005f*CartierResetRatioSpeedFactor;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
w.offset -= 0.005f*CartierResetRatioSpeedFactor * UnityEngine.Random.Range(-0.5f, 2f);
|
w.offset -= 0.005f*CartierResetRatioSpeedFactor * UnityEngine.Random.Range(-0.5f, 2f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (w.offset < 1.0f)
|
else if (w.offset < 1.0f)
|
||||||
{
|
{
|
||||||
if (!CartierResetRatioSpeedRandomize)
|
if (!CartierResetRatioSpeedRandomize)
|
||||||
{
|
{
|
||||||
w.offset += 0.005f*CartierResetRatioSpeedFactor;
|
w.offset += 0.005f*CartierResetRatioSpeedFactor;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
w.offset += 0.005f*CartierResetRatioSpeedFactor*UnityEngine.Random.Range(0f, 3f);
|
w.offset += 0.005f*CartierResetRatioSpeedFactor*UnityEngine.Random.Range(0f, 3f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
w.sprite.transform.localScale = new Vector3(w.offset, w.offset,1.0f);
|
w.sprite.transform.localScale = new Vector3(w.offset, w.offset,1.0f);
|
||||||
}
|
}
|
||||||
//TODO_SR For each player
|
//TODO_SR For each player
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PushWedge(float thetaPlayerX)
|
public void PushWedge(float thetaPlayerX)
|
||||||
{
|
{
|
||||||
var index = GetWedgeIndex(thetaPlayerX);
|
var index = GetWedgeIndex(thetaPlayerX);
|
||||||
var w = wedges[index];
|
var w = wedges[index];
|
||||||
|
|
||||||
w.offset = w.offset - CartierStepSize;
|
w.offset = w.offset - CartierStepSize;
|
||||||
if (w.offset < CartierMinRatio)
|
if (w.offset < CartierMinRatio)
|
||||||
w.offset = CartierMinRatio;
|
w.offset = CartierMinRatio;
|
||||||
|
|
||||||
|
|
||||||
w.sprite.transform.localScale = new Vector3(w.offset, w.offset, 1);
|
w.sprite.transform.localScale = new Vector3(w.offset, w.offset, 1);
|
||||||
|
|
||||||
//push back l'opposée
|
//push back l'opposée
|
||||||
var indexOppose = GetWedgeOpposé(index);
|
var indexOppose = GetWedgeOpposé(index);
|
||||||
var v = wedges[indexOppose];
|
var v = wedges[indexOppose];
|
||||||
|
|
||||||
v.offset = v.offset + CartierStepSize;
|
v.offset = v.offset + CartierStepSize;
|
||||||
if (v.offset > CartierMaxRatio)
|
if (v.offset > CartierMaxRatio)
|
||||||
v.offset = CartierMaxRatio;
|
v.offset = CartierMaxRatio;
|
||||||
|
|
||||||
v.sprite.transform.localScale = new Vector3(v.offset, v.offset, 1);
|
v.sprite.transform.localScale = new Vector3(v.offset, v.offset, 1);
|
||||||
|
|
||||||
// call fill gauge after every hit.
|
// call fill gauge after every hit.
|
||||||
var earthQuakeGauge = FindObjectOfType<Earthquake>();
|
var earthQuakeGauge = FindObjectOfType<Earthquake>();
|
||||||
earthQuakeGauge.FillGauge();
|
earthQuakeGauge.FillGauge();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// On a earthquake, everything expands by a step
|
||||||
/// On a earthquake, everything expands by a step
|
/// </summary>
|
||||||
/// </summary>
|
public void CallEarthQuake()
|
||||||
public void CallEarthQuake()
|
{
|
||||||
{
|
foreach (var w in wedges)
|
||||||
foreach (var w in wedges)
|
{
|
||||||
{
|
w.offset = w.offset + CartierStepSize;
|
||||||
w.offset = w.offset + CartierStepSize;
|
if (w.offset > CartierMaxRatio)
|
||||||
if (w.offset > CartierMaxRatio)
|
w.offset = CartierMaxRatio;
|
||||||
w.offset = CartierMaxRatio;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
//public void PushWedge(float thetaPlayerX)
|
||||||
//public void PushWedge(float thetaPlayerX)
|
//{
|
||||||
//{
|
// var index = GetWedgeIndex(thetaPlayerX);
|
||||||
// var index = GetWedgeIndex(thetaPlayerX);
|
// var w = wedges[index];
|
||||||
// var w = wedges[index];
|
|
||||||
|
// w.offset = w.offset - 0.5f;
|
||||||
|
// if (w.offset < -1.0f)
|
||||||
|
// w.offset = -1.0f;
|
||||||
// w.offset = w.offset - 0.5f;
|
|
||||||
// if (w.offset < -1.0f)
|
// var angle = w.tMin; //w.tMax - TailleCartiersEnDegres/2;
|
||||||
// w.offset = -1.0f;
|
|
||||||
|
// var normalPos = GetPlanetCoordinatesFromPlayerXY(angle, 0);
|
||||||
// var angle = w.tMin; //w.tMax - TailleCartiersEnDegres/2;
|
// normalPos.x -= Mathf.Cos(angle * Mathf.PI / 180);
|
||||||
|
// normalPos.y -= Mathf.Sin(angle * Mathf.PI / 180);
|
||||||
// var normalPos = GetPlanetCoordinatesFromPlayerXY(angle, 0);
|
|
||||||
// normalPos.x -= Mathf.Cos(angle * Mathf.PI / 180);
|
// var wedgePos = GetPlanetCoordinatesFromPlayerXY(angle, 0);
|
||||||
// normalPos.y -= Mathf.Sin(angle * Mathf.PI / 180);
|
// wedgePos.x -= Mathf.Cos(angle * Mathf.PI / 180) - 50 * w.offset * Mathf.Cos(angle * Mathf.PI / 180);
|
||||||
|
// wedgePos.y -= Mathf.Sin(angle * Mathf.PI / 180) - 50 * w.offset * Mathf.Sin(angle * Mathf.PI / 180);
|
||||||
// var wedgePos = GetPlanetCoordinatesFromPlayerXY(angle, 0);
|
|
||||||
// wedgePos.x -= Mathf.Cos(angle * Mathf.PI / 180) - 50 * w.offset * Mathf.Cos(angle * Mathf.PI / 180);
|
// w.sprite.transform.position = Vector3.Lerp(normalPos, wedgePos, Time.deltaTime);
|
||||||
// wedgePos.y -= Mathf.Sin(angle * Mathf.PI / 180) - 50 * w.offset * Mathf.Sin(angle * Mathf.PI / 180);
|
|
||||||
|
// ///push back l'opposée
|
||||||
|
// var indexOppose = GetWedgeOpposé(index);
|
||||||
// w.sprite.transform.position = Vector3.Lerp(normalPos, wedgePos, Time.deltaTime);
|
// var v = wedges[indexOppose];
|
||||||
|
|
||||||
// ///push back l'opposée
|
// v.offset = v.offset + 0.5f;
|
||||||
// var indexOppose = GetWedgeOpposé(index);
|
// if (v.offset > 1.0f)
|
||||||
// var v = wedges[indexOppose];
|
// v.offset = 1.0f;
|
||||||
|
|
||||||
// v.offset = v.offset + 0.5f;
|
// angle = v.tMin; //w.tMax - TailleCartiersEnDegres/2;
|
||||||
// if (v.offset > 1.0f)
|
|
||||||
// v.offset = 1.0f;
|
// normalPos = GetPlanetCoordinatesFromPlayerXY(angle, 0);
|
||||||
|
// normalPos.x -= Mathf.Cos(angle * Mathf.PI / 180);
|
||||||
// angle = v.tMin; //w.tMax - TailleCartiersEnDegres/2;
|
// normalPos.y -= Mathf.Sin(angle * Mathf.PI / 180);
|
||||||
|
|
||||||
// normalPos = GetPlanetCoordinatesFromPlayerXY(angle, 0);
|
// wedgePos = GetPlanetCoordinatesFromPlayerXY(angle, 0);
|
||||||
// normalPos.x -= Mathf.Cos(angle * Mathf.PI / 180);
|
// wedgePos.x -= Mathf.Cos(angle * Mathf.PI / 180) - 50 * v.offset * Mathf.Cos(angle * Mathf.PI / 180);
|
||||||
// normalPos.y -= Mathf.Sin(angle * Mathf.PI / 180);
|
// wedgePos.y -= Mathf.Sin(angle * Mathf.PI / 180) - 50 * v.offset * Mathf.Sin(angle * Mathf.PI / 180);
|
||||||
|
|
||||||
// wedgePos = GetPlanetCoordinatesFromPlayerXY(angle, 0);
|
// v.sprite.transform.position = Vector3.Lerp(normalPos, wedgePos, Time.deltaTime);
|
||||||
// wedgePos.x -= Mathf.Cos(angle * Mathf.PI / 180) - 50 * v.offset * Mathf.Cos(angle * Mathf.PI / 180);
|
|
||||||
// wedgePos.y -= Mathf.Sin(angle * Mathf.PI / 180) - 50 * v.offset * Mathf.Sin(angle * Mathf.PI / 180);
|
//}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
// v.sprite.transform.position = Vector3.Lerp(normalPos, wedgePos, Time.deltaTime);
|
/// Radius sphere est scale/2
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
//}
|
public float GetPlanetRadius()
|
||||||
|
{
|
||||||
|
return gameObject.transform.localScale.x / 2.0f;
|
||||||
/// <summary>
|
}
|
||||||
/// Radius sphere est scale/2
|
|
||||||
/// </summary>
|
/// <summary>
|
||||||
/// <returns></returns>
|
/// Radius sphere est scale/2
|
||||||
public float GetPlanetRadius()
|
/// </summary>
|
||||||
{
|
/// <returns></returns>
|
||||||
return gameObject.transform.localScale.x / 2.0f;
|
public float GetPlanetRadius(float thetaPlayerX)
|
||||||
}
|
{
|
||||||
|
var wedge = GetWedgeFromTheta(thetaPlayerX);
|
||||||
/// <summary>
|
return GetPlanetRadius() * wedge.offset;
|
||||||
/// Radius sphere est scale/2
|
}
|
||||||
/// </summary>
|
public Vector3 GetPlanetCoordinatesFromPlayerXY(float playerLocalX, float playerLocalY)
|
||||||
/// <returns></returns>
|
{
|
||||||
public float GetPlanetRadius(float thetaPlayerX)
|
var theta = playerLocalX;
|
||||||
{
|
var wedgeRadius = GetPlanetRadius(playerLocalX) + playerLocalY;
|
||||||
var wedge = GetWedgeFromTheta(thetaPlayerX);
|
var x = wedgeRadius * Mathf.Cos(theta * Mathf.PI / 180);
|
||||||
return GetPlanetRadius() * wedge.offset;
|
var y = wedgeRadius * Mathf.Sin(theta * Mathf.PI / 180) ;
|
||||||
}
|
|
||||||
|
return new Vector3(x, y, 0);
|
||||||
|
}
|
||||||
public Vector3 GetPlanetCoordinatesFromPlayerXY(float playerLocalX, float playerLocalY)
|
|
||||||
{
|
/// <summary>
|
||||||
var theta = playerLocalX;
|
/// retourn le no de plateforme
|
||||||
var wedgeRadius = GetPlanetRadius(playerLocalX) + playerLocalY;
|
/// </summary>
|
||||||
var x = wedgeRadius * Mathf.Cos(theta * Mathf.PI / 180);
|
/// <param name="thetaPlayerX"></param>
|
||||||
var y = wedgeRadius * Mathf.Sin(theta * Mathf.PI / 180) ;
|
public int GetWedgeIndex(float thetaPlayerX)
|
||||||
|
{
|
||||||
return new Vector3(x, y, 0);
|
return (int)Math.Floor(thetaPlayerX / TailleCartiersEnDegres);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
///
|
||||||
/// retourn le no de plateforme
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="wedgeIndex"></param>
|
||||||
/// <param name="thetaPlayerX"></param>
|
/// <returns></returns>
|
||||||
public int GetWedgeIndex(float thetaPlayerX)
|
public int GetWedgeOpposé(int wedgeIndex)
|
||||||
{
|
{
|
||||||
return (int)Math.Floor(thetaPlayerX / TailleCartiersEnDegres);
|
//(i + 5) % 10 => [0,9]
|
||||||
}
|
return (wedgeIndex + NbCartiers / 2) % (NbCartiers);
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
///
|
/// <summary>
|
||||||
/// </summary>
|
/// retourne l'objet interne
|
||||||
/// <param name="wedgeIndex"></param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="thetaPlayerX"></param>
|
||||||
public int GetWedgeOpposé(int wedgeIndex)
|
/// <returns></returns>
|
||||||
{
|
public Wedge GetWedgeFromTheta(float thetaPlayerX)
|
||||||
//(i + 5) % 10 => [0,9]
|
{
|
||||||
return (wedgeIndex + NbCartiers / 2) % (NbCartiers);
|
return wedges[GetWedgeIndex(thetaPlayerX % 360)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Représente une plateforme qui bouge.
|
||||||
/// retourne l'objet interne
|
/// </summary>
|
||||||
/// </summary>
|
public class Wedge
|
||||||
/// <param name="thetaPlayerX"></param>
|
{
|
||||||
/// <returns></returns>
|
public float offset = 1.0f; //valeurs entre minRatio et maxRatio; < 1 étant renfoncé, 1 position normale, et > 1 vers l'extérieur
|
||||||
public Wedge GetWedgeFromTheta(float thetaPlayerX)
|
public float tMin = 0; //theta min et theta max : angle thetat de début et fin du cartier;
|
||||||
{
|
public float tMax = 0;
|
||||||
return wedges[GetWedgeIndex(thetaPlayerX % 360)];
|
|
||||||
}
|
public GameObject sprite; //sprite et collider 2D
|
||||||
|
|
||||||
/// <summary>
|
}
|
||||||
/// Représente une plateforme qui bouge.
|
}
|
||||||
/// </summary>
|
|
||||||
public class Wedge
|
|
||||||
{
|
|
||||||
public float offset = 1.0f; //valeurs entre minRatio et maxRatio; < 1 étant renfoncé, 1 position normale, et > 1 vers l'extérieur
|
|
||||||
public float tMin = 0; //theta min et theta max : angle thetat de début et fin du cartier;
|
|
||||||
public float tMax = 0;
|
|
||||||
|
|
||||||
public GameObject sprite; //sprite et collider 2D
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@ -572,6 +572,14 @@ Prefab:
|
|||||||
propertyPath: Width
|
propertyPath: Width
|
||||||
value: 0.4
|
value: 0.4
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 11494368, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: EjectSpeed
|
||||||
|
value: 15
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 11494368, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: DashSpeed
|
||||||
|
value: 12
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
|
|||||||
@ -85,6 +85,31 @@ NavMeshSettings:
|
|||||||
cellSize: 0.16666667
|
cellSize: 0.16666667
|
||||||
manualCellSize: 0
|
manualCellSize: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &431637404 stripped
|
||||||
|
GameObject:
|
||||||
|
m_PrefabParentObject: {fileID: 170392, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
m_PrefabInternal: {fileID: 1660116367}
|
||||||
|
--- !u!114 &431637410 stripped
|
||||||
|
MonoBehaviour:
|
||||||
|
m_PrefabParentObject: {fileID: 11494368, guid: acd71c7b2f995984d9033c9dc4e257dc,
|
||||||
|
type: 2}
|
||||||
|
m_PrefabInternal: {fileID: 1660116367}
|
||||||
|
m_Script: {fileID: 11500000, guid: 8c32c40e0b8e5eb47bb7a91068af09ca, type: 3}
|
||||||
|
--- !u!114 &431637411
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 431637404}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 77462b2431858f84b9bc2d055c2f4d45, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
aspi: {fileID: 431637410}
|
||||||
|
WalkAnimSpeed: 3
|
||||||
|
WalkAnimAngle: 20
|
||||||
|
EjectSpinSpeed: 5
|
||||||
--- !u!114 &1027139440 stripped
|
--- !u!114 &1027139440 stripped
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_PrefabParentObject: {fileID: 11471614, guid: 198e988adacced646a19f757f6237ae1,
|
m_PrefabParentObject: {fileID: 11471614, guid: 198e988adacced646a19f757f6237ae1,
|
||||||
@ -138,6 +163,11 @@ Prefab:
|
|||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
|
--- !u!212 &1106066633 stripped
|
||||||
|
SpriteRenderer:
|
||||||
|
m_PrefabParentObject: {fileID: 21220066, guid: acd71c7b2f995984d9033c9dc4e257dc,
|
||||||
|
type: 2}
|
||||||
|
m_PrefabInternal: {fileID: 1660116367}
|
||||||
--- !u!1001 &1223268487
|
--- !u!1001 &1223268487
|
||||||
Prefab:
|
Prefab:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -297,6 +327,10 @@ Prefab:
|
|||||||
propertyPath: m_Radius
|
propertyPath: m_Radius
|
||||||
value: 0.76
|
value: 0.76
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 11494368, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: SpriteWalk
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 1106066633}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
|
|||||||
@ -171,6 +171,53 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
|
--- !u!1001 &160670874
|
||||||
|
Prefab:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 498212, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: -0.6692338
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 498212, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 1.7862048
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 498212, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: -0.045327663
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 498212, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 498212, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 498212, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 498212, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 498212, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 3
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 11450178, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
||||||
|
propertyPath: InputMapperAsset
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 11400000, guid: ba52e0f13249c9e46bb162622e61904f,
|
||||||
|
type: 2}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_ParentPrefab: {fileID: 100100000, guid: 158e745881137e04ca2086294f44d74c, type: 2}
|
||||||
|
m_IsPrefabParent: 0
|
||||||
--- !u!1 &238389812
|
--- !u!1 &238389812
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -231,44 +278,110 @@ Transform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 2
|
|
||||||
--- !u!1 &1024275268
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
serializedVersion: 4
|
|
||||||
m_Component:
|
|
||||||
- 4: {fileID: 1024275269}
|
|
||||||
- 114: {fileID: 1024275270}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: spawnAsteroid
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &1024275269
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1024275268}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
--- !u!114 &1024275270
|
--- !u!212 &841465700 stripped
|
||||||
|
SpriteRenderer:
|
||||||
|
m_PrefabParentObject: {fileID: 21220066, guid: acd71c7b2f995984d9033c9dc4e257dc,
|
||||||
|
type: 2}
|
||||||
|
m_PrefabInternal: {fileID: 1660503799}
|
||||||
|
--- !u!1001 &1660503799
|
||||||
|
Prefab:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 2
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 403646, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_LocalScale.x
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 403646, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_LocalScale.y
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 403646, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 3.46
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 21257324, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_Enabled
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 157058, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 21220066, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_FlipX
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 11494368, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: SpriteWalk
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 841465700}
|
||||||
|
- target: {fileID: 21220066, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_Color.r
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 21220066, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_Color.g
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 21220066, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
propertyPath: m_Color.b
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
m_IsPrefabParent: 0
|
||||||
|
--- !u!1 &1660503800 stripped
|
||||||
|
GameObject:
|
||||||
|
m_PrefabParentObject: {fileID: 170392, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}
|
||||||
|
m_PrefabInternal: {fileID: 1660503799}
|
||||||
|
--- !u!114 &1660503801
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_PrefabParentObject: {fileID: 0}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_PrefabInternal: {fileID: 0}
|
m_PrefabInternal: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1024275268}
|
m_GameObject: {fileID: 1660503800}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 665432c96ca23f140a869ed98ade0dde, type: 3}
|
m_Script: {fileID: 11500000, guid: 77462b2431858f84b9bc2d055c2f4d45, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
myAsteroid: {fileID: 160026, guid: cc1a204562630cd40a1dd685b5ed8e6e, type: 2}
|
aspi: {fileID: 0}
|
||||||
|
WalkAnimSpeed: 4
|
||||||
|
WalkAnimAngle: 20
|
||||||
|
EjectSpinSpeed: 60
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user