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(); }
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); }
public TerrainTile(VectorID tileID, TerrainChunk chunk) : base(tileID) { m_chunk = chunk; if (chunk != null) { m_world = m_chunk.World; } }
public Asset this[VectorID vectorID] { get { Asset entity = null; if(_assetList.ContainsKey(vectorID)) { entity = _assetList[vectorID]; } return entity; } }
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); //} }
public static City GetCity(VectorID cityID) { return Store[cityID] as City; }
public World(VectorID worldID) : this(worldID, new Random((int)DateTime.Now.Ticks).Next(1000, 9999)) { }
public void SetValue(VectorID statID, int baseValue) { m_stats[statID].BaseValue = baseValue; }
public void SetModifier(VectorID statID, int modifier) { m_stats[statID].Modifier = modifier; }
public int GetValue(VectorID statID) { return m_stats[statID].Value; }
public virtual void RemoveAsset(VectorID assetID) { _assets.Remove(assetID); }
public static void SetGlobalVector(VectorID id, Vector4 value) { Shader.SetGlobalVector(_vectorIDs[(int)id], value); }
public Area(VectorID areaID) { this.AssetID = areaID; }
public static Area GetArea(VectorID areaID) { return Store[areaID] as Area; }
public static World GetWorld(VectorID worldID) { return Store[worldID] as World; }
public TerrainTile(VectorID tileID) : this(tileID, null) { }
public virtual Asset this[VectorID id] { get { return _assets[id]; } set { _assets[id] = value; } }
public Asset(VectorID vectorID) { AssetID = vectorID; _assets = new VectorList<Asset>(); }
public virtual void RemoveAsset(VectorID id) { if (_assetList.ContainsKey(id)) { _assetList.Remove(id); } }
public static TerrainTile GetRoom(VectorID roomID) { return Store[roomID] as TerrainTile; }
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; }
public void AddModifier(VectorID statID, int modifier) { m_stats[statID].Modifier += modifier; }
public static int GetVectorPropertyID(VectorID id) { return(_vectorIDs[(int)id]); }
public IStat GetStat(VectorID statID) { return m_stats[statID]; }