本文整理汇总了C#中WCell.Core.Timers.TimerEntry类的典型用法代码示例。如果您正苦于以下问题:C# TimerEntry类的具体用法?C# TimerEntry怎么用?C# TimerEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TimerEntry类属于WCell.Core.Timers命名空间,在下文中一共展示了TimerEntry类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SpawnPoint
public SpawnPoint(SpawnEntry entry, Region region)
{
m_spawns = new List<Unit>();
m_timer = new TimerEntry { Action = Spawn };
m_timer.Stop();
Region = region;
SpawnEntry = entry;
}
开发者ID:ray2006,项目名称:WCell,代码行数:8,代码来源:SpawnPoint.cs
示例2: InitRegion
protected internal override void InitRegion()
{
base.InitRegion();
m_lastReset = DateTime.Now;
m_timeoutTimer = new TimerEntry(OnTimeout);
RegisterUpdatableLater(this);
}
开发者ID:NVN,项目名称:WCell,代码行数:9,代码来源:DungeonInstance.cs
示例3: Battleground
public Battleground()
{
if (HasQueue)
{
_queueTimer = new TimerEntry(dt => ProcessPendingPlayers());
RegisterUpdatable(_queueTimer);
}
_status = BattlegroundStatus.None;
AddPlayersToBiggerTeam = AddPlayersToBiggerTeamDefault;
_teams = new BattlegroundTeam[2];
_shutdownTimer = new TimerEntry(dt => Delete());
RegisterUpdatable(_shutdownTimer);
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:16,代码来源:Battleground.cs
示例4: InitMap
protected internal override void InitMap()
{
base.InitMap();
var secs = difficulty.ResetTime;
if (secs > 0)
{
// TODO: Set expiry time correctly
//m_expiryTime = InstanceMgr.
}
m_lastReset = DateTime.Now;
m_timeoutTimer = new TimerEntry(OnTimeout);
RegisterUpdatableLater(this);
// create InstanceSettings object
settings = CreateSettings();
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:20,代码来源:BaseInstance.cs
示例5: ArathiBase
protected ArathiBase(ArathiBasin instance, GOEntry flagstand)
{
Instance = instance;
// init timers
CaptureTimer = new TimerEntry(dt =>
{
Capture();
});
StartScoreTimer = new TimerEntry(dt =>
{
GivesScore = true;
});
Instance.RegisterUpdatableLater(StartScoreTimer);
Instance.RegisterUpdatableLater(CaptureTimer);
// TODO: flagstand?
SpawnNeutral();
}
开发者ID:NVN,项目名称:WCell,代码行数:21,代码来源:ArathiBase.cs
示例6: ArathiBase
protected ArathiBase(ArathiBasin instance)
{
Instance = instance;
// init timers
CaptureTimer = new TimerEntry(dt =>
{
Capture();
});
StartScoreTimer = new TimerEntry(dt =>
{
GivesScore = true;
});
Instance.RegisterUpdatableLater(StartScoreTimer);
Instance.RegisterUpdatableLater(CaptureTimer);
Names = new string[(int)ClientLocale.End];
AddSpawns();
SpawnNeutral();
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:22,代码来源:ArathiBase.cs
示例7: DeleteNow
protected internal override void DeleteNow()
{
if (m_linkedTrap != null)
{
m_linkedTrap.DeleteNow();
}
if (Respawns)
{
// TODO: Finish respawning
OnDeleted();
m_respawnTimer = new TimerEntry();
}
else
{
base.DeleteNow();
}
}
开发者ID:ray2006,项目名称:WCell,代码行数:18,代码来源:GameObject.cs
示例8: OnDeath
protected override void OnDeath()
{
m_record.LastDeathTime = DateTime.Now;
MarkDead();
Achievements.CheckPossibleAchievementUpdates(AchievementCriteriaType.DeathAtMap, (uint)MapId, 1);
Achievements.CheckPossibleAchievementUpdates(AchievementCriteriaType.DeathInDungeon, (uint)MapId, 1);
// start release timer
m_corpseReleaseTimer = new TimerEntry(dt => ReleaseCorpse());
m_corpseReleaseTimer.Start(Corpse.AutoReleaseDelay, 0);
}
开发者ID:remixod,项目名称:netServer,代码行数:11,代码来源:Character.cs
示例9: NetworkStatistics
protected NetworkStatistics()
{
m_consumerTimer = new TimerEntry(0f, 0f, ConsumerCallback);
m_queuedStats = new SynchronizedQueue<PacketInfo>();
}
开发者ID:ray2006,项目名称:WCell,代码行数:5,代码来源:NetworkStatistics.cs
示例10: Unit
protected Unit()
{
Type |= ObjectTypes.Unit;
// combat
m_isInCombat = false;
m_attackTimer = new TimerEntry(0.0f, 0.0f, CombatTick);
CastSpeedFactor = 1f;
ResetMechanicDefaults();
m_flying = m_waterWalk = m_hovering = m_featherFalling = 0;
m_canMove = m_canInteract = m_canHarm = m_canCastSpells = true;
}
开发者ID:ray2006,项目名称:WCell,代码行数:15,代码来源:Unit.cs
示例11: LoadDeathState
private void LoadDeathState()
{
if (m_record.CorpseX != null)
{
// we were dead and released the corpse
var map = World.GetMap(m_record.CorpseMap);
if (map != null)
{
m_corpse = SpawnCorpse(false, false, map,
new Vector3(m_record.CorpseX.Value, m_record.CorpseY, m_record.CorpseZ), m_record.CorpseO);
BecomeGhost();
}
else
{
// can't spawn corpse -> revive
if (log.IsWarnEnabled)
{
log.Warn("Player {0}'s Corpse was spawned in invalid map: {1}", this, m_record.CorpseMap);
}
}
}
else if (m_record.Health == 0)
{
// we were dead and did not release yet
var diff = DateTime.Now.Subtract(m_record.LastDeathTime).ToMilliSecondsInt() + Corpse.AutoReleaseDelay;
m_corpseReleaseTimer = new TimerEntry(dt => ReleaseCorpse());
if (diff > 0)
{
// mark dead and start release timer
MarkDead();
m_corpseReleaseTimer.Start(diff, 0);
}
else
{
// auto release
ReleaseCorpse();
}
}
else
{
// we are alive and kicking
}
}
开发者ID:MeaNone,项目名称:WCell,代码行数:44,代码来源:Character.Maintenance.cs
示例12: SpellCast
/// <summary>
/// Creates a recyclable SpellCast.
/// </summary>
private SpellCast()
{
m_castTimer = new TimerEntry(Perform);
Targets = new HashSet<WorldObject>();
}
开发者ID:ebakkedahl,项目名称:WCell,代码行数:8,代码来源:SpellCast.cs
示例13: Equals
public bool Equals(TimerEntry obj)
{
// needs to be improved
return obj.Interval == Interval && Equals(obj.Action, Action);
}
开发者ID:ray2006,项目名称:WCell,代码行数:5,代码来源:TimerEntry.cs
示例14: SpellCast
/// <summary>
/// Creates a recyclable SpellCast.
/// </summary>
/// <param name="caster">The GameObject (in case of traps etc) or Unit casting</param>
private SpellCast()
{
m_castTimer = new TimerEntry(Perform);
}
开发者ID:primax,项目名称:WCell,代码行数:8,代码来源:SpellCast.cs
示例15: SpellChannel
/// <summary>
/// Can only work with unit casters
/// </summary>
private SpellChannel()
{
m_timer = new TimerEntry(Tick);
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:7,代码来源:SpellChannel.cs
示例16: OnDeath
protected override void OnDeath()
{
m_record.LastDeathTime = DateTime.Now;
MarkDead();
// start release timer
m_corpseReleaseTimer = new TimerEntry(dt => ReleaseCorpse());
m_corpseReleaseTimer.Start(Corpse.AutoReleaseDelay, 0);
}
开发者ID:Skizot,项目名称:WCell,代码行数:9,代码来源:Character.cs
示例17: Start
protected bool Start()
{
try
{
IsCached = AuthServerConfiguration.CacheAccounts;
//I would have liked this to be a readonly field but it must be
//initialised here otherwise in the ctor AccountReloadIntervalMs
//wont have been init'd which would mean we cant customise the timer easily
_accountsReloadTimer = new TimerEntry(0, AccountReloadIntervalMs, delay =>
{
if (Instance.IsCached)
Instance.Resync();
});
_accountsReloadTimer.Start();
AuthenticationServer.IOQueue.RegisterUpdatable(_accountsReloadTimer);
if (Count == 0)
{
log.Info("Detected empty Account-database.");
//if (!DoesAccountExist("Administrator"))
//{
// CreateAccount("Administrator", DefaultAdminPW, null, RoleGroupInfo.HighestRole.Name, ClientId.Wotlk);
// log.Warn("Created new Account \"Administrator\" with same password.");
//}
}
}
catch (Exception e)
{
AuthDBMgr.OnDBError(e);
}
return true;
}
开发者ID:origins,项目名称:WCell,代码行数:33,代码来源:AccountMgr.cs
示例18: StartTimer
internal void StartTimer()
{
m_timer = new TimerEntry(AuthenticationStoreMillis, 0, dl => Remove());
m_timer.Start();
AuthenticationServer.IOQueue.RegisterUpdatable(m_timer);
}
开发者ID:remixod,项目名称:netServer,代码行数:6,代码来源:AuthenticationRecord.cs
示例19: Create
/// <summary>
/// Creates a new character and loads all required character data from the database
/// </summary>
/// <param name="acc">The account the character is associated with</param>
/// <param name="record">The name of the character to load</param>
/// <param name="client">The client to associate with this character</param>
internal protected void Create(RealmAccount acc, CharacterRecord record, IRealmClient client)
{
client.ActiveCharacter = this;
acc.ActiveCharacter = this;
Type |= ObjectTypes.Player;
ChatChannels = new List<ChatChannel>(5);
m_logoutTimer = new TimerEntry(0, DefaultLogoutDelayMillis, totalTime => FinishLogout());
Account = acc;
m_client = client;
m_record = record;
EntityId = EntityId.GetPlayerId(m_record.EntityLowId);
m_name = m_record.Name;
Archetype = ArchetypeMgr.GetArchetype(record.Race, record.Class);
MainWeapon = GenericWeapon.Fists;
PowerType = m_archetype.Class.DefaultPowerType;
StandState = StandState.Sit;
Money = (uint) m_record.Money;
Outfit = m_record.Outfit;
//ScaleX = m_archetype.Race.Scale;
ScaleX = 1;
Gender = m_record.Gender;
Skin = m_record.Skin;
Facial = m_record.Face;
HairStyle = m_record.HairStyle;
HairColor = m_record.HairColor;
FacialHair = m_record.FacialHair;
UnitFlags = UnitFlags.PlayerControlled;
Experience = m_record.Xp;
RestXp = m_record.RestXp;
SetInt32(UnitFields.LEVEL, m_record.Level);
// cannot use Level property, since it will trigger certain events that we don't want triggered
NextLevelXP = XpGenerator.GetXpForlevel(m_record.Level + 1);
MaxLevel = RealmServerConfiguration.MaxCharacterLevel;
RestState = RestState.Normal;
Orientation = m_record.Orientation;
m_bindLocation = new WorldZoneLocation(
m_record.BindMap,
new Vector3(m_record.BindX, m_record.BindY, m_record.BindZ),
m_record.BindZone);
PvPRank = 1;
YieldsXpOrHonor = true;
foreach (var school in WCellDef.AllDamageSchools)
{
SetFloat(PlayerFields.MOD_DAMAGE_DONE_PCT + (int) school, 1);
}
SetFloat(PlayerFields.DODGE_PERCENTAGE, 1.0f);
// Auras
m_auras = new PlayerAuraCollection(this);
// spells
m_spells = PlayerSpellCollection.Obtain(this);
// factions
WatchedFaction = m_record.WatchedFaction;
Faction = FactionMgr.ByRace[(uint) record.Race];
m_reputations = new ReputationCollection(this);
// skills
m_skills = new SkillCollection(this);
// talents
m_talents = new PlayerTalentCollection(this);
// achievements
m_achievements = new AchievementCollection(this);
// Items
m_inventory = new PlayerInventory(this);
m_mailAccount = new MailAccount(this);
m_questLog = new QuestLog(this);
// tutorial flags
TutorialFlags = new TutorialFlags(m_record.TutorialFlags);
// Make sure client and internal state is updated with combat base values
UnitUpdates.UpdateSpellCritChance(this);
// Mask of activated TaxiNodes
//.........这里部分代码省略.........
开发者ID:MeaNone,项目名称:WCell,代码行数:101,代码来源:Character.Maintenance.cs
示例20: StartTimer
internal void StartTimer()
{
m_timer = new TimerEntry(AuthenticationStoreSeconds, 0f, dl => Remove());
m_timer.Start();
AuthenticationServer.Instance.RegisterUpdatable(m_timer);
}
开发者ID:ray2006,项目名称:WCell,代码行数:6,代码来源:AuthenticationRecord.cs
注:本文中的WCell.Core.Timers.TimerEntry类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论