Alpha commit
This commit is contained in:
30
Jump Game/Assets/Scripts/Debug/DebugRespawn.cs
Normal file
30
Jump Game/Assets/Scripts/Debug/DebugRespawn.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class DebugRespawn : MonoBehaviour
|
||||
{
|
||||
public Button button;
|
||||
private GameObject player;
|
||||
private Rigidbody2D rbody;
|
||||
private GameObject camera;
|
||||
|
||||
void Start()
|
||||
{
|
||||
camera = GameObject.FindWithTag("MainCamera");
|
||||
player = GameObject.FindWithTag("Player");
|
||||
rbody = player.GetComponent<Rigidbody2D>();
|
||||
button.onClick.AddListener(Respawn);
|
||||
}
|
||||
|
||||
|
||||
void Respawn()
|
||||
{
|
||||
rbody.velocity = new Vector3(0, 0, 0);
|
||||
player.transform.position = new Vector3(-7, -2, -0.16f);
|
||||
camera.transform.position = new Vector3(0.9002959f, 2.056212f, -32.28906f);
|
||||
//CameraController.storedPosition = 0f;
|
||||
}
|
||||
}
|
11
Jump Game/Assets/Scripts/Debug/DebugRespawn.cs.meta
Normal file
11
Jump Game/Assets/Scripts/Debug/DebugRespawn.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 198b158ebd15b4b4fb0620187b2abe75
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
26
Jump Game/Assets/Scripts/Debug/Valueprint.cs
Normal file
26
Jump Game/Assets/Scripts/Debug/Valueprint.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class Valueprint : MonoBehaviour
|
||||
{
|
||||
public Text text;
|
||||
public PlayerController playerController;
|
||||
double charger;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
charger = playerController.charger;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
charger = System.Math.Round(playerController.charger,1);
|
||||
text.text = charger.ToString();
|
||||
}
|
||||
}
|
11
Jump Game/Assets/Scripts/Debug/Valueprint.cs.meta
Normal file
11
Jump Game/Assets/Scripts/Debug/Valueprint.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 851757fe5cf49ba408a082927c8e5487
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user