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


C# AI.verifyNetwork方法代码示例

本文整理汇总了C#中AI.verifyNetwork方法的典型用法代码示例。如果您正苦于以下问题:C# AI.verifyNetwork方法的具体用法?C# AI.verifyNetwork怎么用?C# AI.verifyNetwork使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AI的用法示例。


在下文中一共展示了AI.verifyNetwork方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

	void Start () {
		// fighter is the model, fighterAnimator is the animation controller, we need access to it here in order
		// to set the correct bools that trigger different animation states
		fighterAnimator = fighter.GetComponent<Animator> ();
		// Capture the animation behaviors that underlie each state.  
		animatedBehaviours = fighterAnimator.GetBehaviours<BufferedStateMachineBehaviour>();

		UnityEngine.Debug.Log ("PWD: " + Directory.GetParent(Directory.GetCurrentDirectory()).FullName);

		health = 1000.0f; // Debug for animation
		maxHealth = health;

		gravity = 0.05f;
		initialJumpVelocity = .61f;

		blockPercentage = 1.0f;

		reach = 0.0f;
		attackDamage = 0.0f;
		lowAttack = false;
		inputHold = false;
		attackWasThrown = false;
		attackWasFinished = false;
		attackHit = false;
		blocking = false;
		lowBlocking = false;

		GameObject MIObj = GameObject.Find ("Info");
		MenuInfo MI_gd = MIObj.GetComponent<MenuInfo> ();
		if (player1) {
			if (MI_gd.isp1AI ()) {
				setPlayerAI ();
			}
				

			playerBodyBox = GameObject.Find ("Player1BodyBox");
			playerHitBox = GameObject.Find ("Player1HitBox");
			playerBlockBox = GameObject.Find ("Player1BlockBox");

			if (isAI) {
				int inPort = 4998;

				playerAI = new AI (inPort, inPort + 1);
				playerAI.verifyNetwork ();

			} else {
				Up = KeyCode.W;
				Down = KeyCode.S;
				Left = KeyCode.A;
				Right = KeyCode.D;
				Run = KeyCode.LeftShift;
				Attack1 = KeyCode.Q;
				Attack2 = KeyCode.E;
				Block = KeyCode.F;
			}

		} else { // player 2
			if (MI_gd.isp2AI ()) {
				setPlayerAI ();
			}
			playerBodyBox = GameObject.Find ("Player2BodyBox");
			playerHitBox = GameObject.Find ("Player2HitBox");
			playerBlockBox = GameObject.Find ("Player2BlockBox");

			if (isAI){
				int inPort = 5998;

				playerAI = new AI (inPort, inPort + 1);
				playerAI.verifyNetwork ();
			} else {
				Up = KeyCode.I;
				Down = KeyCode.K;
				Left = KeyCode.J;
				Right = KeyCode.L;
				Run = KeyCode.RightShift;
				Attack1 = KeyCode.U;
				Attack2 = KeyCode.O;
				Block = KeyCode.H;
			}

		}
	}
开发者ID:rhyschris,项目名称:CS194Project,代码行数:82,代码来源:PlayerController.cs


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