• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# States类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中States的典型用法代码示例。如果您正苦于以下问题:C# States类的具体用法?C# States怎么用?C# States使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



States类属于命名空间,在下文中一共展示了States类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: corridor_3

	void corridor_3() {
		text.text = "You're standing back in the corridor, now convincingly dressed as a cleaner. " +
					"You strongly consider the run for freedom.\n\n" +
					"Press S to take the Stairs, or U to Undress";
		if 		(Input.GetKeyDown(KeyCode.S)) 	{myState = States.courtyard;}
		else if (Input.GetKeyDown(KeyCode.U)) 	{myState = States.in_closet;}
	}
开发者ID:Thegamekills,项目名称:FirstGitRepository,代码行数:7,代码来源:TextController.cs


示例17: courtyard

	void courtyard () {
		text.text = "You walk through the courtyard dressed as a cleaner. " +
					"The guard tips his hat at you as you waltz past, claiming " +
					"your freedom. You heart races as you walk into the sunset.\n\n" +
					"Press P to Play again." ;
		if 		(Input.GetKeyDown(KeyCode.P)) 	{myState = States.cell;}
	}
开发者ID:Thegamekills,项目名称:FirstGitRepository,代码行数:7,代码来源:TextController.cs


示例18: OnGUI

 void OnGUI()
 {
     if(GUILayout.Button("NEXT STATE"))
     {
         if(currentState == States.START)
         {
             currentState = States.PLAYERCHOICE;
         }
         else if (currentState == States.PLAYERCHOICE)
         {
             currentState = States.ENEMYCHOICE;
         }
         else if (currentState == States.ENEMYCHOICE)
         {
             currentState = States.LOSE;
         }
         else if (currentState == States.LOSE)
         {
             currentState = States.WIN;
         }
         else if (currentState == States.WIN)
         {
             currentState = States.START;
         }
     }
 }
开发者ID:ngwangsa,项目名称:HitB_Adventure,代码行数:26,代码来源:TurnBasedStateMachine.cs


示例19: cell

 void cell()
 {
     text.text = "Press S to Sheet -- M to Mirror -- L to Lock \n";
     if (Input.GetKeyDown(KeyCode.S))      {myState = States.sheet_0;}
     else if (Input.GetKeyDown(KeyCode.M)) {myState = States.mirror;}
     else if (Input.GetKeyDown(KeyCode.L)) {myState = States.lock_0;}
 }
开发者ID:thuongnht,项目名称:GameUnity,代码行数:7,代码来源:TextCtrl.cs


示例20: Egg

 public Egg(SpriteManager cm,int id, int x, int y)
 {
     pos = new Point(x, y);
     this.id = id;
     this.egg = cm.GetSprite("Players/Egg");
     this.st = States.IDLE;
 }
开发者ID:fiahil,项目名称:Zappy,代码行数:7,代码来源:Egg.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Static类代码示例发布时间:2022-05-24
下一篇:
C# Statements类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap