public void LoadReplay(string name) { ReplayVars data = ReplayScript.LoadReplay(name); movementVector = data.movementVector; inputs = data.inputs; switches = data.switches; GameEngine.instance.lineFreezingMechanic = switches[0]; bag = data.bag; frames = 0; }
// Use this for initialization void Start() { playerBody = GetComponent<Rigidbody2D>(); initialXPos = transform.position.x; initialTouchPosition = new Vector2(0, 0); cameraTransform = GameObject.FindGameObjectWithTag("MainCamera").transform; replayObject = GameObject.FindGameObjectWithTag("Respawn"); replayMenu = replayObject.GetComponentInChildren<ReplayScript>(); scoreBoard = GameObject.FindGameObjectWithTag("MainUI").GetComponent<ScoreUIScript>(); trail = GetComponentInChildren<TrailRenderer>(); indicatorSpawner = GetComponent<FlowerSpawner>(); }
public void SaveReplay(string name) { ReplayScript.SaveReplay(this, name); }