Exemplo n.º 1
0
    void Start()
    {
        ServiceLocator.Instance.eventManager.Register(this);
        string loadString = PlayerPrefs.GetString("myData");

        playerData = JsonUtility.FromJson <BallModel.PlayerData>(loadString);

        _ballRigidbody = GameObject.Find("Ball").GetComponent <Rigidbody>();
        _force         = _ballConfig.force;
        GameObject.Find("Text").GetComponent <TextManager>().setup(playerData);
    }
Exemplo n.º 2
0
 public void setup(BallModel.PlayerData data)
 {
     playerData = data;
     point      = data.point;
 }