Пример #1
0
    public string scene;        // Current scene

    public PlayerData(GameObject player)
    {
        LinkController link = player.gameObject.GetComponent <LinkController>();                 // This gets the main characters attributes for data manipulation.

        health      = link.health;
        scene       = link.getScene();
        position    = new float[2];
        position[0] = player.transform.position.x;                      // Players x coordinate
        position[1] = player.transform.position.y;                      // Players y coordinate
    }