当前位置: 首页>>代码示例>>C#>>正文


C# States类代码示例

本文整理汇总了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;}
	}
开发者ID:rolpe,项目名称:UnityTextAdventure,代码行数:7,代码来源:TextController.cs

示例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;}
    }
开发者ID:sbsmith86,项目名称:PartyPrison,代码行数:7,代码来源:TextController.cs

示例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;
 }
开发者ID:BenjaminBoumendil,项目名称:SHMUP,代码行数:7,代码来源:Boss1.cs

示例4: BankFish

 public BankFish(Project P)
 {
     State = States.WritePro;
     Pro = P;
     InitializeComponent();
     Btn_Edit.Enabled = Btn_Delete.Enabled = false;
 }
开发者ID:NavidDorfeshan,项目名称:WinFormapp_EsfahanGhos,代码行数:7,代码来源:BankFish.cs

示例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;
		}
开发者ID:leezer3,项目名称:OpenBVE,代码行数:11,代码来源:AtsSx.cs

示例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;
        }
开发者ID:kennedykinyanjui,项目名称:Projects,代码行数:34,代码来源:SalesTaxCalculationService.cs

示例7: Check

 public Check(Factor F)
 {
     State = States.WriteF;
     F1 = F;
     InitializeComponent();
     Btn_Edit.Enabled = Btn_Delete.Enabled = false;
 }
开发者ID:NavidDorfeshan,项目名称:WinFormapp_EsfahanGhos,代码行数:7,代码来源:Check.cs

示例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;
            }
        }
开发者ID:taoxiease,项目名称:asegrp,代码行数:29,代码来源:RegExpChecker.Auto_Email_53.cs

示例9: Cutscene

 public Cutscene(States a_backState, String a_sceneToLoad)
 {
     m_backState = a_backState;
     m_comDone = 0;
     m_filePath = a_sceneToLoad;
     m_waitingForKey = false;
 }
开发者ID:theKyuu,项目名称:GLhf,代码行数:7,代码来源:Cutscene.cs

示例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);
        }
开发者ID:doanhtdpl,项目名称:pvz-the-birds,代码行数:7,代码来源:Damaging.cs

示例11: Wait

	void Wait() {
		waitTimer += Time.deltaTime;
		if(waitTimer > waitTime) {
			waitTimer = 0.0f;
			currentState = States.Moving;
		}
	}
开发者ID:Darylcxz,项目名称:ANIMA-FYP,代码行数:7,代码来源:FreeWandering.cs

示例12: Start

	void Start() {
		waitTimer = 0.0f;
		circleCenter = transform.position + new Vector3(0, 0, offset);
		currentTargetPosition = transform.position;
		//currentTargetPosition = FindNewTargetPosition();
		currentState = States.Moving;
	}
开发者ID:Darylcxz,项目名称:ANIMA-FYP,代码行数:7,代码来源:FreeWandering.cs

示例13: QuitLobby

 public static void QuitLobby()
 {
     MultiPlayer.Shutdown("Game", string.Empty);
     Players = null;
     Timers.Remove("Positions");
     State = States.MainMenu;
 }
开发者ID:DeanReynolds,项目名称:Indie-Dev-Tycoon,代码行数:7,代码来源:Game.cs

示例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;}
	}
开发者ID:Thegamekills,项目名称:FirstGitRepository,代码行数:7,代码来源:TextController.cs

示例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;
        }
开发者ID:doanhtdpl,项目名称:pvz-the-birds,代码行数:26,代码来源:Cold.cs


注:本文中的States类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。