本文整理汇总了C#中States类的典型用法代码示例。如果您正苦于以下问题:C# States类的具体用法?C# States怎么用?C# States使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
States类属于命名空间,在下文中一共展示了States类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: lock_0
void lock_0() {
text.text = "This is one of those button locks. You have no idea what the " +
"combination is. You wish you could somehow see where the dirty " +
"fingerprints were, maybe that would help.\n\n" +
"Press R to Return to roaming your cell" ;
if (Input.GetKeyDown(KeyCode.R)) {myState = States.cell;}
}
示例2: bar_2
void bar_2()
{
text.text = "The bar is really crowded now. It takes a while, but you finally settle your tab. \n\n" +
"Press B to go back to your date";
if (Input.GetKeyDown(KeyCode.B)) {myState = States.date_2;}
}
示例3: move
protected override void move()
{
if (Camera.main.gameObject.transform.position.y + 5f <= transform.position.y)
transform.Translate (new Vector3 (0f, Time.deltaTime * 5f, 0f));
else
state = States.Phase1;
}
示例4: BankFish
public BankFish(Project P)
{
State = States.WritePro;
Pro = P;
InitializeComponent();
Btn_Edit.Enabled = Btn_Delete.Enabled = false;
}
示例5: AtsSx
// --- constructors ---
/// <summary>Creates a new instance of this system with default parameters.</summary>
/// <param name="train">The train.</param>
internal AtsSx(Train train) {
this.Train = train;
this.State = States.Disabled;
this.AlarmCountdown = 0.0;
this.SpeedCheckCountdown = 0.0;
this.RedSignalLocation = 0.0;
}
示例6: Calculate
public decimal Calculate(decimal price, States state, string zip)
{
decimal taxPrice = default(decimal);
// Call Real Web Service to determine the Sales Tax.
switch (state)
{
case States.Arizona:
taxPrice = CalculateTaxPriceInternal(price, 7.125, zip);
break;
case States.Illinois:
taxPrice = CalculateTaxPriceInternal(price, 3.75, zip);
break;
case States.Massachusetts:
taxPrice = CalculateTaxPriceInternal(price, 6.25, zip);
break;
case States.California:
taxPrice = CalculateTaxPriceInternal(price, 2.50, zip);
break;
case States.Washington:
taxPrice = CalculateTaxPriceInternal(price, 3.10, zip);
break;
case States.NewJersey:
taxPrice = CalculateTaxPriceInternal(price, 7.00, zip);
break;
case States.Texas:
taxPrice = CalculateTaxPriceInternal(price, 8.15, zip);
break;
default:
taxPrice = 0;
break;
}
return taxPrice;
}
示例7: Check
public Check(Factor F)
{
State = States.WriteF;
F1 = F;
InitializeComponent();
Btn_Edit.Enabled = Btn_Delete.Enabled = false;
}
示例8: AcceptChar
public bool AcceptChar(char c)
{
switch (_state)
{
case States.STATE0:
if (-1 == ("[email protected]_-~#").IndexOf(c))
{
_state = States.STATE1;
return true;
}
//throw new Exception("Invalid input character");
return false;
case States.STATE1:
if (-1 == ("[email protected]_-~#").IndexOf(c))
{
_state = States.STATE1;
return true;
}
return false;
default:
//throw new Exception("Invalid state value");
return false;
}
}
示例9: Cutscene
public Cutscene(States a_backState, String a_sceneToLoad)
{
m_backState = a_backState;
m_comDone = 0;
m_filePath = a_sceneToLoad;
m_waitingForKey = false;
}
示例10: ChangeState
public virtual void ChangeState(States.ZombieState currentState, States.ZombieState lastState)
{
lastState.Image.Color = GMath.DeGammaBlend(lastState.Image.Color, Color.Red, 0.5f);
if (!(currentState is States.Death))
currentState.Image.Color = GMath.GammaBlend(currentState.Image.Color, Color.Red, 0.5f);
}
示例11: Wait
void Wait() {
waitTimer += Time.deltaTime;
if(waitTimer > waitTime) {
waitTimer = 0.0f;
currentState = States.Moving;
}
}
示例12: Start
void Start() {
waitTimer = 0.0f;
circleCenter = transform.position + new Vector3(0, 0, offset);
currentTargetPosition = transform.position;
//currentTargetPosition = FindNewTargetPosition();
currentState = States.Moving;
}
示例13: QuitLobby
public static void QuitLobby()
{
MultiPlayer.Shutdown("Game", string.Empty);
Players = null;
Timers.Remove("Positions");
State = States.MainMenu;
}
示例14: in_closet
void in_closet() {
text.text = "Inside the closet you see a cleaner's uniform that looks about your size! " +
"Seems like your day is looking-up.\n\n" +
"Press D to Dress up, or R to Return to the corridor";
if (Input.GetKeyDown(KeyCode.R)) {myState = States.corridor_2;}
else if (Input.GetKeyDown(KeyCode.D)) {myState = States.corridor_3;}
}
示例15: Apply
public virtual bool Apply(States.ZombieState state)
{
this.Timer.Start();
if (!(state is States.Death) && GetZombieColds(state.Zombie) == 0)
{
state.Image.Color = GMath.GammaBlend(state.Image.Color, Color.Blue, 0.5f);
state.Image.Delay = (long)(state.Image.Delay / ColdAffect);
States.Walk walk = state as States.Walk;
if (walk != null)
{
walk.Velocity *= ColdAffect;
}
States.Attack att = state as States.Attack;
if (att != null)
{
att.AttackTimer.Interval = TimeSpan.FromMilliseconds(att.AttackTimer.Interval.TotalMilliseconds / ColdAffect);
}
return true;
}
return false;
}