Exemplo n.º 1
0
 protected internal override void Serialize(IComponentDataWriter writer, IAssetStore assetStore)
 {
     base.Serialize(writer, assetStore);
     if (Sprite == null)
     {
         writer.WriteNull("Sprite");
     }
     else
     {
         writer.WriteAssetId("Sprite", assetStore.GetAssetId(Sprite));
     }
 }
        protected internal override void Serialize(IComponentDataWriter writer, IAssetStore assetStore)
        {
            base.Serialize(writer, assetStore);

            if (Sound is null)
            {
                writer.WriteNull("Sound");
            }
            else
            {
                writer.WriteAssetId("Sound", assetStore.GetAssetId(Sound));
            }

            writer.WriteBool("IsPlaying", IsPlaying);
        }