﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SaveData : MonoBehaviour
{
    void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.tag == "Goal")
        {
            Debug.Log("Save");
            int playerScore = GetComponent<PlayerController>().playerScore;
            PlayerPrefs.SetInt("PlayerScore", playerScore);
        }
    }
}

