You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.3 KiB
58 lines
1.3 KiB
4 years ago
|
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.SceneManagement;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
public class ReplayTest : MonoBehaviour {
|
||
|
|
||
|
// Use this for initialization
|
||
|
void Start () {
|
||
|
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update () {
|
||
|
|
||
|
}
|
||
|
|
||
|
private void OnEnable()
|
||
|
{
|
||
|
GetComponent<Button>().onClick.AddListener(OnClick);
|
||
|
}
|
||
|
|
||
|
private void OnDisable()
|
||
|
{
|
||
|
GetComponent<Button>().onClick.RemoveListener(OnClick);
|
||
|
}
|
||
|
|
||
|
private void OnDestroy()
|
||
|
{
|
||
|
GetComponent<Button>().onClick.RemoveListener(OnClick);
|
||
|
}
|
||
|
|
||
|
private void OnClick()
|
||
|
{
|
||
|
Replay.inputHistory = InputHistory.Instance;
|
||
|
|
||
|
GameSettings.othersSettings.playState =PlayState.Playing;
|
||
|
|
||
|
InputManager.frameCount = 0;
|
||
|
InputManager.cloneObjType = CloneObjType.None;
|
||
|
//InputManager.isDragEditorMode = false;
|
||
|
// InputManager.isRotateEditorMode = false;
|
||
|
|
||
|
CreateStaticObjID.staticGameObjID = 0;
|
||
|
|
||
|
EntitiesManager.Instance.Reset();
|
||
|
|
||
|
SelectedObjs.gameObjs.Clear();
|
||
|
SelectedObjs.selectedObj = null;
|
||
|
SelectedObjs.characters.Clear();
|
||
|
SelectedObjs.selectedCharacters.Clear();
|
||
|
|
||
|
SceneManager.LoadScene("TestMainScene",LoadSceneMode.Single);
|
||
|
}
|
||
|
}
|