本文整理汇总了C#中Globals类的典型用法代码示例。如果您正苦于以下问题:C# Globals类的具体用法?C# Globals怎么用?C# Globals使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Globals类属于命名空间,在下文中一共展示了Globals类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GitTfsRemote
public GitTfsRemote(RemoteOptions remoteOptions, Globals globals, ITfsHelper tfsHelper, TextWriter stdout)
{
this.remoteOptions = remoteOptions;
this.globals = globals;
this.stdout = stdout;
Tfs = tfsHelper;
}
示例2: InitBranch
public InitBranch(TextWriter stdout, Globals globals, Help helper, AuthorsFile authors)
{
_stdout = stdout;
_globals = globals;
_helper = helper;
_authors = authors;
}
示例3: Subtree
public Subtree(Fetch fetch, QuickFetch quickFetch, Globals globals, RemoteOptions remoteOptions)
{
_fetch = fetch;
_quickFetch = quickFetch;
_globals = globals;
_remoteOptions = remoteOptions;
}
示例4: GetConvictionColor
public static Color GetConvictionColor(Globals.Conviction conviction)
{
Color color = Color.white;
switch(conviction){
case Globals.Conviction.anger:
color = GetMoodColor(Globals.Mood.lustful);
break;
case Globals.Conviction.envy:
color = GetMoodColor(Globals.Mood.obsessed);
break;
case Globals.Conviction.gluttony:
color = GetMoodColor(Globals.Mood.bitter);
break;
case Globals.Conviction.greed:
color = GetMoodColor(Globals.Mood.idealistic);
break;
case Globals.Conviction.lust:
color = Color.blue;
break;
case Globals.Conviction.pride:
color = GetMoodColor(Globals.Mood.conservative);
break;
case Globals.Conviction.sloth:
color = GetMoodColor(Globals.Mood.lovestruck);
// Debug.Log(color);
break;
}
// Debug.Log("getting color " + color + " for conviction " + conviction.ToString());
return color;
}
示例5: ListRemoteBranches
public ListRemoteBranches(Globals globals, TextWriter stdout, ITfsHelper tfsHelper, RemoteOptions remoteOptions)
{
this.globals = globals;
this.stdout = stdout;
this.tfsHelper = tfsHelper;
this.remoteOptions = remoteOptions;
}
示例6: Bootstrap
public Bootstrap(RemoteOptions remoteOptions, Globals globals, TextWriter stdout, Bootstrapper bootstrapper)
{
_remoteOptions = remoteOptions;
_globals = globals;
_stdout = stdout;
_bootstrapper = bootstrapper;
}
示例7: Clone
public Clone(Globals globals, Fetch fetch, Init init, InitBranch initBranch)
{
this.fetch = fetch;
this.init = init;
this.globals = globals;
this.initBranch = initBranch;
}
示例8: Fetch
public Fetch(Globals globals, RemoteOptions remoteOptions, AuthorsFile authors, Labels labels)
{
this.remoteOptions = remoteOptions;
this.globals = globals;
this.authors = authors;
this.labels = labels;
}
示例9: Rcheckin
public Rcheckin(TextWriter stdout, CheckinOptions checkinOptions, TfsWriter writer, Globals globals)
{
_stdout = stdout;
_checkinOptions = checkinOptions;
_checkinOptionsFactory = new CommitSpecificCheckinOptionsFactory(_stdout, globals);
_writer = writer;
}
示例10: Start
void Start() {
Globals[] globals = GameObject.FindObjectsOfType<Globals> ();
for (int c = 1; c < globals.Length; c++) {
Destroy(globals[c].gameObject);
}
global = globals [0];
}
示例11: Parse
protected void Parse(StringReader rdr, DepthScanner scanner, Globals globals)
{
int currentLine = 0;
ParseNamespace(rdr, globals, scanner, ref currentLine, false);
// Resolve incomplete names
foreach (string key in globals.GetPropertyNames())
{
TypeInfo t = globals.GetProperty(key, true) as TypeInfo;
if (t != null)
{
if (!t.IsComplete)
globals.AddProperty(key, globals.GetTypeInfo(t.Name), -1, "");
if (t is TemplateInst)
{
TemplateInst ti = t as TemplateInst;
if (!ti.WrappedType.IsComplete)
ti.WrappedType = globals.GetTypeInfo(ti.WrappedType.Name);
}
}
}
foreach (FunctionInfo f in globals.GetFunctions(null, true))
{
f.ResolveIncompletion(globals);
}
foreach (TypeInfo type in globals.TypeInfo)
{
type.ResolveIncompletion(globals);
}
}
示例12: GameServer
public GameServer(int port, Globals.LoggerDelegate logger)
{
m_IP = "0.0.0.0";
m_port = port;
m_logger = logger;
m_Player = new Player[NPLAYER];
m_Player[0] = new Player();
m_Player[1] = new Player();
reacive_t = new Thread[NPLAYER];
connection_t = new Thread((limitConnection));
connection_t.Start();
//reacive_t[0] = new Thread(
try
{
listener = new TcpListener(IPAddress.Parse(m_IP), m_port); //listner
}
catch (ArgumentNullException)
{
m_logger("caught ArgumentNullException");
}
catch (ArgumentOutOfRangeException)
{
m_logger("caught ArgumentOutOfRangeException");
}
}
示例13: Awake
void Awake()
{
globals = Globals.GetInstance();
XPBarSlider = XPBarSliderGO.GetComponent<UISlider>();
maxWidth = XPBarSlider.foreground.localScale.x;
if(XPBarSlider == null)
{
Debug.LogError("Couldn't get the UISlider component in XPBar Script.");
}
XPMaximum = globals.XPMaximum;
if(XPMaximum == 0)
{
globals.XPPoints = 0;
PlayerPrefs.SetInt("XP", 0);
XPMaximum = 100;
globals.XPMaximum = 100;
PlayerPrefs.SetInt("XPMaximum", 100);
Debug.Log("This is the first time XP bar is used.");
}
//XPBar.pixelInset.width = globals.XPPoints / (globals.XPMaximum / 100);
XPPoints = globals.XPPoints;
UpdateDisplay((XPPoints / XPMaximum));
player = GameObject.FindWithTag("Player");
}
示例14: GetGlobalVariable
public static string GetGlobalVariable(Globals globals, string varName, string defaultValue)
{
string result;
if (globals == null)
{
result = defaultValue;
}
else
{
object[] array = (object[])globals.VariableNames;
if (globals.get_VariableExists(varName))
{
object[] array2 = array;
for (int i = 0; i < array2.Length; i++)
{
object obj = array2[i];
if (obj.ToString() == varName)
{
result = (string)globals[varName];
return result;
}
}
}
result = defaultValue;
}
return result;
}
示例15: load
public void load(Globals globals)
{
int count = ParameterSerializer.loadParameter(globals, SERVER_COUNT, -1);
if (count != -1)
{
try
{
for (int i = 1; i <= count; ++i)
{
string guidStr = ParameterSerializer.loadParameter(globals, SERVER_GUID + i, null);
Guid guid = new Guid(guidStr);
string sName = ParameterSerializer.loadParameter(globals, SERVER_NAME + guidStr, null);
string url = ParameterSerializer.loadParameter(globals, SERVER_URL + guidStr, null);
JiraServer server = new JiraServer(guid, sName, url, null, null);
server.UserName = CredentialsVault.Instance.getUserName(server);
server.Password = CredentialsVault.Instance.getPassword(server);
addServer(server);
}
changedSinceLoading = false;
}
catch (Exception e)
{
Debug.WriteLine(e);
}
}
}