Exemplo n.º 1
0
        public override TagCompound Save()
        {
            string versionString = mod.Version.ToString();

            return(new TagCompound {
                { "LightColor", lightColor },
                { "PointsCollected", PointsCollected?.Pack() },
                { "ForgeHotbarItems", ForgeHotbarItems },
                { "LastVer", versionString }
            });
        }
Exemplo n.º 2
0
    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);
        }
    }