コード例 #1
0
        public override TagCompound Save()
        {
            string versionString = mod.Version.ToString();

            return(new TagCompound {
                { "LightColor", lightColor },
                { "PointsCollected", PointsCollected?.Pack() },
                { "ForgeHotbarItems", ForgeHotbarItems },
                { "LastVer", versionString }
            });
        }
コード例 #2
0
ファイル: PlayerController.cs プロジェクト: kurrik/ld45
    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);
        }
    }