コード例 #1
0
 public void SyncPlant(string _OldPlantSyncString, string _PlantSyncString)
 {
     PlantSyncString = _PlantSyncString;
     if (!isServer)
     {
         if (DefaultPlantData.PlantDictionary.ContainsKey(PlantSyncString))
         {
             plantData = DefaultPlantData.PlantDictionary[PlantSyncString].plantData;
         }
     }
     SpriteHandler.spriteData = SpriteFunctions.SetupSingleSprite(plantData.ProduceSprite);
     SpriteHandler.PushTexture();
     if (ItemAttributesV2 == null)
     {
         ItemAttributesV2 = this.GetComponent <ItemAttributesV2>();
     }
     if (isServer && ItemAttributesV2 != null)
     {
         ItemAttributesV2.ServerSetArticleDescription(plantData.Description);
         ItemAttributesV2.ServerSetArticleName(plantData.Plantname);
     }
     this.name = plantData.Plantname;
 }