public void Init()
    {
        FileStream   fs   = new FileStream("Assets/bin/" + GetName() + ".bin", FileMode.Open);
        BinaryReader br   = new BinaryReader(fs);
        int          size = br.ReadInt32();

        byte[] bytes = BitConverter.GetBytes(size);
        Array.Reverse(bytes);
        size  = BitConverter.ToInt32(bytes, 0);
        Datas = new Dictionary <object, AbstractConfigEntry>();
        for (int i = 0; i < size; i++)
        {
            AbstractConfigEntry t = CreateInstance();
            t.Init(br);
            Datas.Add(GetKey(t), t);
        }
        br.Close();
        fs.Close();
    }
    public override object GetKey(AbstractConfigEntry t)
    {
        SpawnSequenceConfigEntry configEntry = (SpawnSequenceConfigEntry)t;

        return(configEntry.Id);
    }
Example #3
0
    public override object GetKey(AbstractConfigEntry t)
    {
        PathConfigEntry configEntry = (PathConfigEntry)t;

        return(configEntry.Id);
    }
 public abstract object GetKey(AbstractConfigEntry t);
Example #5
0
    public override object GetKey(AbstractConfigEntry t)
    {
        ScenarioPointConfigEntry configEntry = (ScenarioPointConfigEntry)t;

        return(configEntry.Id);
    }