CEngineSharp_Editor.World.Npc.Load C# (CSharp) Method

Load() public static method

public static Load ( string filePath ) : Npc
filePath string
return Npc
        public static Npc Load(string filePath)
        {
            Npc npc = new Npc();

            using (FileStream fs = new FileStream(filePath, FileMode.OpenOrCreate))
            {
                using (BinaryReader binaryReader = new BinaryReader(fs))
                {
                    npc.Name = binaryReader.ReadString();
                    npc.TextureNumber = binaryReader.ReadInt32();
                    npc.HP = binaryReader.ReadInt32();
                    npc.MP = binaryReader.ReadInt32();
                    npc.Strength = binaryReader.ReadInt32();
                }
            }

            return npc;
        }