public override TagCompound Save() { string versionString = mod.Version.ToString(); return(new TagCompound { { "LightColor", lightColor }, { "PointsCollected", PointsCollected?.Pack() }, { "ForgeHotbarItems", ForgeHotbarItems }, { "LastVer", versionString } }); }
public void SpawnPoints(int points) { GameObject obj = Instantiate <GameObject>( pointsCollectedPrefab, transform.position, Quaternion.identity, transform.parent ); PointsCollected pc = obj.GetComponent <PointsCollected>(); if (pc) { pc.Activate(transform, points); } }