JSONObject.Copy C# (CSharp) Method

Copy() public method

Copy a JSONObject. This could probably work better
public Copy ( ) : JSONObject,
return JSONObject,
	public JSONObject Copy()
	{
		return Create(Print());
	}
	/*

Usage Example

Example #1
0
    private IEnumerator _hurt(int dmg)
    {
        print($"{gameObject.name} hurt for {dmg}");
        health -= dmg;
        if (health <= 0)
        {
            GameRound.Instance.EndGame(gameObject.name);
        }

        JSONObject jSonObject = HurtMsgFormat.Copy();

        jSonObject["playerName"].str = gameObject.name;
        jSonObject["health"].n       = health;
        jSonObject["dmg"].n          = dmg;
        _eventManager.InvokeEvent("playerHurt", jSonObject);
        yield return(null);
    }
All Usage Examples Of JSONObject::Copy