Пример #1
0
		void Update () {
			//移動に関する総合処理
			try{
				cMcontroller.MoveManagement (transform.position.y,
				                             Vector3.Distance(transform.position,cMcontroller.GetDestinationXZ()));
			} catch(ArgumentOutOfRangeException e){
				Debug.Log("SaveExceptionLog : " + e);
				TextReadWriteManager write = new TextReadWriteManager();
				write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString());
			}


			//重力
			cMcontroller.SetGravityAcceleration ();

			//接地時地面に押し付ける
			cMcontroller.SnapZero ();

			//CharacterControllerを使って動かす
			characterController.Move(cMcontroller.GetVelocity() * Time.deltaTime+cMcontroller.GetSnapGround());
			cMcontroller.WalkStop ();

			//強制的に向きを変えるのを解除
			ForceRotateCancel ();
		}
Пример #2
0
		private void StopAttack(){
			try{
				cAController.StopAttack ();
			}catch(ArgumentException e){
				Debug.Log("SaveErrorLog : " + e);
				TextReadWriteManager write = new TextReadWriteManager();
				write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString());
			}
		}
Пример #3
0
		//アイテム取得
		public void GetItem(DropItemController.ItemKind itemKind){
			try{
				controller.GetItem (itemKind);
			}catch(ArgumentException e){
				Debug.Log("SaveErrorLog : " + e);
				TextReadWriteManager write = new TextReadWriteManager();
				write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString());
			}

		}
Пример #4
0
			public bool attackCount(){
			try{
				return controller.AttackCount ();
			} catch(TimeoutException e){
				Debug.Log("SaveExceptionLog : " + e);
				TextReadWriteManager write = new TextReadWriteManager();
				write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString());
			}

			return true;
			}
Пример #5
0
			IEnumerator Exec(){
				while(true){
					try{
						controller.Generate(0, existEnemys.Length);
					}catch(ArgumentException e){
						Debug.Log("SaveErrorLog : " + e);
						TextReadWriteManager write = new TextReadWriteManager();
						write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString());
					}
					yield return new WaitForSeconds(controller.GetRePopTime());
				}
			}
Пример #6
0
			void LateUpdate()
			{		
				try{
					//ドラッグ入力でカメラのアングルを更新
					controller.MoveAngle ();
				}catch(ArgumentOutOfRangeException e){
					Debug.Log("SaveErrorLog : " + e);
					TextReadWriteManager write = new TextReadWriteManager();
					write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString());
				}

				//カメラの位置と回転を更新
				controller.CameraPosUpdate ();
			}
Пример #7
0
			protected override void StartUp ()
			{
					this.setElapsedTime (3.0f);
					this.setAttackRate (4.0f);
				      
					//コンポーネント取得
					GetComponents ();
					eController.SetWaitTime (eController.GetWaitBaseTime ());
					SetBasePosition ();
					this.setPlayerTransform (objPlayer.transform);
					Log ();
		
				try{
					//FSMを構築
					eController.BuildFSM ();
				}catch(UnityException e){
					Debug.Log("SaveExceptionLog : " + e);
					TextReadWriteManager write = new TextReadWriteManager();
					write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString());
				}
			}
Пример #8
0
		void Update () {
			//スライド開始地点
			inputController.SlideStart ();				

			try{
			//画面の一割以上移動させたらスライド開始
			inputController.Sliding (true);
			
			//スライド操作が終了したか
			inputController.StopSlide (false);

			}catch(ArgumentOutOfRangeException e){
				Debug.Log("SaveErrorLog : " + e);
				TextReadWriteManager write = new TextReadWriteManager();
				write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString());
			}

			//移動量を求める
			inputController.Moved ();
			
			//カーソル位置を更新
			inputController.PrevPosition ();
		}
Пример #9
0
				void Damage(AttackInfo attackInfo)
			{
				//ヒットエフェクト
				CreateHitEffect ();
				EffectPos ();
				Destroy (effect, 0.3f);

				//HPを減らす
				status.DamageHP(attackInfo.GetAttackPower());

				//死体を攻撃できないようにし、体力0なので倒れる
				try{
					eController.Down();
				}catch (UnityException e){
					Debug.Log("SaveExceptionLog : " + e);
					TextReadWriteManager write = new TextReadWriteManager();
					write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString());
				}
			}
Пример #10
0
			public void AttackStart(){
				try{
					eController.attackStart ();
				}catch(UnityException e){
					Debug.Log("SaveExceptionLog : " + e);
					TextReadWriteManager write = new TextReadWriteManager();
					write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString());
				}
					
			}
Пример #11
0
			public void SetTransition(Transition t)
			{
				try{
				this.RunTransition (t);
				}catch(UnityException e){
					Debug.Log("SaveExceptionLog : " + e);
					TextReadWriteManager write = new TextReadWriteManager();
					write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString());
				}
			}