本文整理汇总了C#中GameMode.age_check方法的典型用法代码示例。如果您正苦于以下问题:C# GameMode.age_check方法的具体用法?C# GameMode.age_check怎么用?C# GameMode.age_check使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameMode
的用法示例。
在下文中一共展示了GameMode.age_check方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: pollCandidates
// Range: -1 Access: 0 Flags: ( 0, 4, 255 )
public static ByTable pollCandidates( string Question = null, string jobbanType = null, GameMode gametypeCheck = null, dynamic be_special_flag = null, int? poll_time = null ) {
ByTable candidates = null;
int time_passed = 0;
Mob_Dead_Observer G = null;
Mob_Dead_Observer G2 = null;
if ( be_special_flag == null ) {
be_special_flag = 0;
}
if ( poll_time == null ) {
poll_time = 300;
}
candidates = new ByTable();
time_passed = Game13.time;
if ( !Lang13.Bool( Question ) ) {
Question = "Would you like to be a special role?";
}
G = null;
foreach (dynamic _b in GlobalVars.player_list ) {
if ( !( _b is Mob_Dead_Observer ) ) {
continue;
}
G = _b;
if ( !Lang13.Bool( ((dynamic)G).key ) || !Lang13.Bool( ((dynamic)G).client ) ) {
continue;
}
if ( Lang13.Bool( be_special_flag ) ) {
if ( !Lang13.Bool( ((dynamic)G).client.prefs.be_special & be_special_flag ) ) {
continue;
}
}
if ( gametypeCheck != null ) {
if ( !gametypeCheck.age_check( ((dynamic)G).client ) ) {
continue;
}
}
if ( Lang13.Bool( jobbanType ) ) {
if ( Lang13.Bool( GlobalFuncs.jobban_isbanned( G, jobbanType ) ) || Lang13.Bool( GlobalFuncs.jobban_isbanned( G, "Syndicate" ) ) ) {
continue;
}
}
Task13.schedule( 0, (Task13.Closure)(() => {
((dynamic)G).write( "sound/misc/notice2.ogg" );
dynamic _a = GlobalFuncs.askuser( G, Question, "Please answer in " + ( poll_time ??0) / 10 + " seconds!", "Yes", "No", null, false, poll_time ); // Was a switch-case, sorry for the mess.
if ( _a==1 ) {
((dynamic)G).write( "<span class='notice'>Choice registered: Yes.</span>" );
if ( Game13.time - time_passed > ( poll_time ??0) ) {
((dynamic)G).write( "<span class='danger'>Sorry, you were too late for the consideration!</span>" );
((dynamic)G).write( "sound/machines/buzz-sigh.ogg" );
} else {
candidates += G;
}
} else if ( _a==2 ) {
((dynamic)G).write( "<span class='danger'>Choice registered: No.</span>" );
};
return;
}));
};
Task13.sleep( poll_time ??0 );
G2 = null;
foreach (dynamic _c in candidates ) {
if ( !( _c is Mob_Dead_Observer ) ) {
continue;
}
G2 = _c;
if ( !Lang13.Bool( ((dynamic)G2).key ) || !Lang13.Bool( ((dynamic)G2).client ) ) {
candidates.Remove( G2 );
}
};
return candidates;
}