Esempio n. 1
0
        public World(VectorID vectorID, long seed)
        {
            nameGenerator =
                new MarkovNameGenerator("Abrielle,Acalia,Adair,Adara,Adriel,Aiyana,Alaire,Alissa,Alixandra,Altair,Amara,Anatola,Anya,Arcadia,Ariadne,Arianwen,Aurelia,Aurelian,Aurelius,Auristela,Avalon,Bastian,Breena,Briallan,Brielle,Briseis,Cambria,Cara,Carys,Caspian,Cassia,Cassiel,Cassiopeia,Cassius,Chaniel,Cora,Corbin,Cyprian,Dagen,Daire,Darius,Destin,Devlin,Devlyn,Drake,Drystan,Eira,Eirian,Eliron,Elysia,Eoin,Evadne,Evanth,Fineas,Finian,Fyodor,Gaerwn,Gareth,Gavriel,Ginerva,Griffin,Guinevere,Hadriel,Hannelore,Hermione,Hesperos,Iagan,Ianthe,Ignacia,Ignatius,Iseult,Isolde,Jessalyn,Kara,Katriel,Kerensa,Korbin,Kyler,Kyra,Kyrielle,Leala,Leila,Leira,Lilith,Liora,Liriene,Liron,Lucien,Lyra,Maia,Marius, Mathieu,Maylea,Meira,Mireille,Mireya,Natania,Neirin,Nerys,Nuriel,Nyfain,Nyssa,Oisin,Oleisa,Oralie,Orinthea,Orion,Orpheus,Ozara,Peregrine,Persephone,Perseus,Petronela,Phelan,Pryderi,Pyralia,Pyralis,Qadira,Quinevere,Quintessa,Raisa,Remus,Renfrew,Rhyan,Rhydderch,Riona,Saira,Saoirse,Sarai,Sarielle,Sebastian,Seraphim,Seraphina,Serian,Sirius,Sorcha,Séverin,Tavish,Tearlach,Terra,Thalia,Thaniel,Theia,Torian,Torin,Tressa,Tristana,Ulyssia,Uriela,Urien,Vanora,Vasilis,Vespera,Xanthus,Xara,Xylia,Yadira,Yakira,Yeira,Yeriel,Yestin,Yseult,Zaira,Zaniel,Zarek,Zephyr,Zora,Zorion".Split(','), 2);

            AssetID = vectorID;
            m_seed = seed;

            UpdateNoise();
        }
Esempio n. 2
0
        public MapViewer(VectorID worldID)
        {
            WorldID = worldID;

            InitializeComponent();

            gridControl1.m_world = Assets.Assets.GetWorld(worldID);
            gridControl2.m_world = Assets.Assets.GetWorld(worldID);
            gridControl3.m_world = Assets.Assets.GetWorld(worldID);
        }
Esempio n. 3
0
        public TerrainTile(VectorID tileID, TerrainChunk chunk)
            : base(tileID)
        {
            m_chunk = chunk;

            if (chunk != null)
            {
                m_world = m_chunk.World;
            }
        }
Esempio n. 4
0
        public Asset this[VectorID vectorID]
        {
            get
            {
                Asset entity = null;

                if(_assetList.ContainsKey(vectorID))
                {
                    entity = _assetList[vectorID];
                }

                return entity;
            }
        }
Esempio n. 5
0
        public Exit(VectorID exitID)
        {
            AssetID = exitID;

            //Stat[] stats = new Stat[]
            //{
            //    new Pulse() { Vector=new VectorID(StatVector.Point, 1), Abbreviation="VIS",  Name="Visibility" },
            //    new Pulse() { Vector=new VectorID(StatVector.Point, 2), Abbreviation="LOCK", Name="Lock Level" },
               // };

            //foreach (IStat stat in stats)
               // {
            //    AddStat(stat);
            //}
        }
Esempio n. 6
0
 public static City GetCity(VectorID cityID)
 {
     return Store[cityID] as City;
 }
Esempio n. 7
0
 public World(VectorID worldID)
     : this(worldID, new Random((int)DateTime.Now.Ticks).Next(1000, 9999))
 {
 }
Esempio n. 8
0
 public void SetValue(VectorID statID, int baseValue)
 {
     m_stats[statID].BaseValue = baseValue;
 }
Esempio n. 9
0
 public void SetModifier(VectorID statID, int modifier)
 {
     m_stats[statID].Modifier = modifier;
 }
Esempio n. 10
0
 public int GetValue(VectorID statID)
 {
     return m_stats[statID].Value;
 }
Esempio n. 11
0
 public virtual void RemoveAsset(VectorID assetID)
 {
     _assets.Remove(assetID);
 }
Esempio n. 12
0
 public static void SetGlobalVector(VectorID id, Vector4 value)
 {
     Shader.SetGlobalVector(_vectorIDs[(int)id], value);
 }
Esempio n. 13
0
 public Area(VectorID areaID)
 {
     this.AssetID = areaID;
 }
Esempio n. 14
0
 public static Area GetArea(VectorID areaID)
 {
     return Store[areaID] as Area;
 }
Esempio n. 15
0
 public static World GetWorld(VectorID worldID)
 {
     return Store[worldID] as World;
 }
Esempio n. 16
0
 public TerrainTile(VectorID tileID)
     : this(tileID, null)
 {
 }
Esempio n. 17
0
 public virtual Asset this[VectorID id]
 {
     get
     {
         return _assets[id];
     }
     set
     {
         _assets[id] = value;
     }
 }
Esempio n. 18
0
        public Asset(VectorID vectorID)
        {
            AssetID = vectorID;

            _assets = new VectorList<Asset>();
        }
Esempio n. 19
0
 public virtual void RemoveAsset(VectorID id)
 {
     if (_assetList.ContainsKey(id))
     {
         _assetList.Remove(id);
     }
 }
Esempio n. 20
0
 public static TerrainTile GetRoom(VectorID roomID)
 {
     return Store[roomID] as TerrainTile;
 }
Esempio n. 21
0
        public virtual VectorID CreateAsset(Type assetType)
        {
            long vectorID;
            long assetID;
            Asset asset;

            asset = null;

            VectorID id = null;

            if(assetType.IsSubclassOf(typeof(Asset)))
            {
                if(!_typeIndexList.ContainsKey(assetType))
                {
                    _typeIndexList.Add(assetType, _maxIndex);

                    while (_currentIDList.ContainsKey(_maxIndex))
                    {
                        _maxIndex++;
                    }
                }

                vectorID = _typeIndexList[assetType];

                if(!_currentIDList.ContainsKey(vectorID))
                {
                    _currentIDList.Add(vectorID, 1);
                }

                try
                {
                     assetID = _currentIDList[vectorID];
                    id = new VectorID(vectorID, assetID);
                    _currentIDList[vectorID]++;
                    asset = Activator.CreateInstance(assetType, id) as Asset;
                    _assetList.Add(id, asset);
                }
                catch
                {
                    _currentIDList[vectorID]--;
                    throw new InvalidCastException("unable to create inststance of " + assetType.FullName);
                }

            }
            else
            {
                throw new InvalidCastException("entityType does not derive from Entity.");
            }

            return id;
        }
Esempio n. 22
0
 public void AddModifier(VectorID statID, int modifier)
 {
     m_stats[statID].Modifier += modifier;
 }
Esempio n. 23
0
 public static int GetVectorPropertyID(VectorID id)
 {
     return(_vectorIDs[(int)id]);
 }
Esempio n. 24
0
 public IStat GetStat(VectorID statID)
 {
     return m_stats[statID];
 }