Ejemplo n.º 1
0
        public static string[] GetSalvableDataFromScript(object data)
        {
            if (data.GetType() == typeof(Player))
            {
                return(PlayerData.SavePlayerData((Player)data));
            }
            else if (data.GetType() == typeof(AmmunitionContainer))
            {
                return(AmmunitionData.SaveAmmunitionData((AmmunitionContainer)data));
            }
            else if (data.GetType() == typeof(StaticElement))
            {
                return(StaticElementData.SaveStaticElementDataData((StaticElement)data));
            }
            else if (data.GetType() == typeof(SwitchTrigger))
            {
                return(SwitchTriggerData.SaveSwitchTriggerData((SwitchTrigger)data));
            }
            else if (data.GetType() == typeof(Inventory))
            {
                return(InventoryData.SaveInventoryData((Inventory)data));
            }

            return(null);
        }