Esempio n. 1
0
    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;
    }
Esempio n. 2
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>();
 }
Esempio n. 3
0
 public void SaveReplay(string name)
 {
     ReplayScript.SaveReplay(this, name);
 }