/// <summary> /// 지정된 이름의 파일로부터 SIMONObject target에 대한 History Record를 전부 로드해서 2차원 배열로 반환합니다. /// </summary> /// <param name="fileName">history를 불러올 대상 파일입니다.</param> /// <param name="sObject">대상 targetObject입니다.</param> /// <returns>history를 반환할 2차원 배열 map.</returns> public SIMONProperty[][] LoadHistory(string fileName, SIMONObject targetObject) { SIMONDataIOCommand ioCmd = new SIMONDataIOCommand(); ioCmd.order = SIMONDataIO.READ; ioCmd.fileName = fileName; ioCmd.contents = ""; IAsyncResult aResult = SimonDataManager.Service(ref ioCmd); bool readErr = false; string readStr = ""; int lineCnt = 0; SimonDataManager.ReadResult(ref readErr, ref readStr, ref lineCnt, aResult); char delimiter = ','; SIMONProperty[][] historyData = new SIMONProperty[lineCnt][]; for (int i = 0; i < lineCnt; i++) { historyData[i] = new SIMONProperty[targetObject.Properties.Count]; for (int j = 0; j < targetObject.Properties.Count; j++) historyData[i][j] = new SIMONProperty(); } int prevDelimIdx = 0; int propIdx = 0; int historyLineIdx = 0; for (int i = 0; i < readStr.Length; i++) { if (readStr[i].Equals(delimiter)) { string sVal = ""; for (int j = prevDelimIdx+1; j < i; j++) { sVal += readStr[j]; } double dval = Double.Parse(sVal); prevDelimIdx = i; historyData[historyLineIdx][propIdx].PropertyName = targetObject.Properties[propIdx].PropertyName; historyData[historyLineIdx][propIdx].PropertyValue = dval; propIdx++; } if (propIdx == targetObject.Properties.Count) { historyLineIdx++; propIdx = 0; } } return historyData; }
// Use this for initialization void Start () { gObj_Monster = this.gameObject; animator = GetComponent<Animator> (); if (GameTimeManager_Simulation.GroupA.Count == NormalGameSceneManager_Simulation.Total_Object) { for(int i= 0 ; i < GameTimeManager_Simulation.GroupA.Count ; i++) { if(((SIMONObject)GameTimeManager_Simulation.GroupA.ValueOfIndex (i)).ObjectID.Equals(gObj_Monster.name)) { sObject = ((SIMONObject)GameTimeManager_Simulation.GroupA.ValueOfIndex (i)); reStart(); return; } } } SimulationType = SceneManager.SimulationType; if(SimulationType == 1) init (); else init ((int)Monster_ID); sObject = new SIMONObject (); sObject.ObjectID = gObj_Monster.name; GameTimeManager_Simulation.GroupA.Add (sObject.ObjectID, sObject); GameTimeManager_Simulation.GroupC.Add (sObject.ObjectID, sObject); SIMONProperty Strength = new SIMONProperty (); Strength.PropertyName = "Strength"; Strength.PropertyValue = (double)PropertyValue [0]; // Strength.Inherit = true; SIMONProperty Attack_Speed = new SIMONProperty (); Attack_Speed.PropertyName = "Attack_Speed"; Attack_Speed.PropertyValue = (double)PropertyValue [1]; // Attack_Speed.Inherit = true; SIMONProperty Moving_Speed = new SIMONProperty (); Moving_Speed.PropertyName = "Moving_Speed"; Moving_Speed.PropertyValue =(double)PropertyValue [2]; // Moving_Speed.Inherit = true; SIMONProperty Critical = new SIMONProperty (); Critical.PropertyName = "Critical"; Critical.PropertyValue = (double)PropertyValue [3]; //Critical.Inherit = true; SIMONProperty Defensive = new SIMONProperty (); Defensive.PropertyName = "Defensive"; Defensive.PropertyValue = (double)PropertyValue [4]; //Defensive.Inherit = true; SIMONProperty CON = new SIMONProperty (); CON.PropertyName = "CON"; CON.PropertyValue = (double)PropertyValue [5]; // CON.Inherit = true; SIMONProperty Range = new SIMONProperty (); Range.PropertyName = "Range"; Range.PropertyValue =(double)PropertyValue [6]; // Range.Inherit = true; SIMONProperty HP = new SIMONProperty (); HP.PropertyName = "HP"; HP.PropertyValue = CON.PropertyValue*50.0d; SIMONProperty CurHp = new SIMONProperty (); CurHp.PropertyName = "CurHp"; CurHp.PropertyValue = CON.PropertyValue*50.0d; SIMONProperty PositionX = new SIMONProperty (); PositionX.PropertyName = "PositionX"; SIMONProperty PositionY = new SIMONProperty (); PositionY.PropertyName = "PositionY"; SIMONProperty Type = new SIMONProperty (); Type.PropertyName = "Type"; if(gObj_Monster.tag.ToString().Equals("Home")) Type.PropertyValue = 2; else Type.PropertyValue = 1; SIMONProperty State = new SIMONProperty (); State.PropertyName = "State"; State.PropertyValue = -1.0f; SIMONProperty Target = new SIMONProperty (); Target.PropertyName = "Target"; Target.PropertyValue = -1.0f; SIMONProperty ID = new SIMONProperty (); ID.PropertyName = "ID"; ID.PropertyValue = (double)Monster_ID; SIMONProperty AttackedCount = new SIMONProperty (); AttackedCount.PropertyName = "AttackedCount"; AttackedCount.PropertyValue = 0.0d; SIMONProperty Move_Target = new SIMONProperty (); Move_Target.PropertyName = "Move_Target"; Move_Target.PropertyValue = 0.0d; SIMONProperty Attack_Target = new SIMONProperty (); Attack_Target.PropertyName = "Attack_Target"; Attack_Target.PropertyValue = 0.0d; SIMONProperty isCheck = new SIMONProperty (); isCheck.PropertyName = "isCheck"; isCheck.PropertyValue = 0.0d; SIMONProperty coolTime_Attack_Start = new SIMONProperty (); coolTime_Attack_Start.PropertyName = "coolTime_Attack_Start"; coolTime_Attack_Start.PropertyValue = 0.0d; SIMONProperty Monster_Skill_CoolTime = new SIMONProperty (); Monster_Skill_CoolTime.PropertyName = "Monster_Skill_CoolTime"; Monster_Skill_CoolTime.PropertyValue = 60.0d; SIMONProperty Skill_number = new SIMONProperty (); Skill_number.PropertyName = "Skill_number"; Skill_number.PropertyValue = 0.0d; SIMONProperty End = new SIMONProperty (); End.PropertyName = "End"; End.PropertyValue = 0.0d; SIMONProperty Monster_Damage = new SIMONProperty (); Monster_Damage.PropertyName = "Monster_Damage"; Monster_Damage.PropertyValue = Strength.PropertyValue; SIMONProperty Monster_Attack_Speed = new SIMONProperty (); Monster_Attack_Speed.PropertyName = "Monster_Attack_Speed"; Monster_Attack_Speed.PropertyValue = 4.0f -(float) Attack_Speed.PropertyValue / 10; SIMONProperty Monster_Moving_Speed = new SIMONProperty (); Monster_Moving_Speed.PropertyName = "Monster_Moving_Speed"; Monster_Moving_Speed.PropertyValue =(float)(Moving_Speed.PropertyValue / 20); SIMONProperty Monster_Range = new SIMONProperty (); Monster_Range.PropertyName = "Monster_Range"; Monster_Range.PropertyValue = 1.0f + (Range.PropertyValue/6); SIMONProperty Monster_Defensive = new SIMONProperty (); Monster_Defensive.PropertyName = "Monster_Defensive"; Monster_Defensive.PropertyValue = (float)Defensive.PropertyValue; SIMONProperty Monster_Critical = new SIMONProperty (); Monster_Critical.PropertyName = "Monster_Critical"; Monster_Critical.PropertyValue = (float)Critical.PropertyValue; SIMONProperty Monster_Sight = new SIMONProperty (); Monster_Sight.PropertyName = "Monster_Sight"; Monster_Sight.PropertyValue = (float)Monster_Range.PropertyValue; SIMONProperty Monster_Enemy_1 = new SIMONProperty (); Monster_Enemy_1.PropertyName = "Monster_Enemy_1"; Monster_Enemy_1.PropertyValue = (float)0.0d; SIMONProperty Monster_Enemy_2 = new SIMONProperty (); Monster_Enemy_2.PropertyName = "Monster_Enemy_2"; Monster_Enemy_2.PropertyValue = (float)0.0d; SIMONProperty Monster_Enemy_3 = new SIMONProperty (); Monster_Enemy_3.PropertyName = "Monster_Enemy_3"; Monster_Enemy_3.PropertyValue = (float)0.0d; SIMONProperty Monster_Enemy_4 = new SIMONProperty (); Monster_Enemy_4.PropertyName = "Monster_Enemy_4"; Monster_Enemy_4.PropertyValue = (float)0.0d; SIMONProperty Monster_Home_1 = new SIMONProperty (); Monster_Home_1.PropertyName = "Monster_Home_1"; Monster_Home_1.PropertyValue = (float)0.0d; SIMONProperty Monster_Home_2 = new SIMONProperty (); Monster_Home_2.PropertyName = "Monster_Home_2"; Monster_Home_2.PropertyValue = (float)0.0d; SIMONProperty Monster_Home_3 = new SIMONProperty (); Monster_Home_3.PropertyName = "Monster_Home_3"; Monster_Home_3.PropertyValue = (float)0.0d; SIMONProperty Monster_Home_4 = new SIMONProperty (); Monster_Home_4.PropertyName = "Monster_Home_4"; Monster_Home_4.PropertyValue = (float)0.0d; SIMONProperty Monster_Avoid_State = new SIMONProperty (); Monster_Avoid_State.PropertyName = "Monster_Avoid_State"; Monster_Avoid_State.PropertyValue = (float)0.0d; SIMONProperty Monster_Home_Total = new SIMONProperty (); Monster_Home_Total.PropertyName = "Monster_Home_Total"; Monster_Home_Total.PropertyValue = (float)0.0d; SIMONProperty Monster_Enemy_Total = new SIMONProperty (); Monster_Enemy_Total.PropertyName = "Monster_Enemy_Total"; Monster_Enemy_Total.PropertyValue = (float)0.0d; SIMONProperty Monster_Avoid_Time = new SIMONProperty(); Monster_Avoid_Time.PropertyName = "Monster_Avoid_Time"; Monster_Avoid_Time.PropertyValue = 0.0d; SIMONProperty Monster_Total_Damage = new SIMONProperty (); Monster_Total_Damage.PropertyName = "Monster_Total_Damage"; Monster_Total_Damage.PropertyValue = 0.0d; SIMONProperty Monster_Total_AttackedDamage = new SIMONProperty (); Monster_Total_AttackedDamage.PropertyName = "Monster_Total_AttackedDamage"; Monster_Total_AttackedDamage.PropertyValue = 0.0d; SIMONProperty Monster_Total_AttackedCount = new SIMONProperty (); Monster_Total_AttackedCount.PropertyName = "Monster_Total_AttackedCount"; Monster_Total_AttackedCount.PropertyValue = 0.0d; SIMONProperty Monster_Total_AttackCount = new SIMONProperty (); Monster_Total_AttackCount.PropertyName = "Monster_Total_AttackCount"; Monster_Total_AttackCount.PropertyValue = 0.0d; SIMONProperty Monster_Total_Defense = new SIMONProperty (); Monster_Total_Defense.PropertyName = "Monster_Total_Defense"; Monster_Total_Defense.PropertyValue = 0.0d; SIMONProperty Monster_Enemy_Defensive = new SIMONProperty (); Monster_Enemy_Defensive.PropertyName = "Monster_Enemy_Defensive"; Monster_Enemy_Defensive.PropertyValue = 0.0d; SIMONProperty Monster_Enemy_CurHp = new SIMONProperty (); Monster_Enemy_CurHp.PropertyName = "Monster_Enemy_CurHp"; Monster_Enemy_CurHp.PropertyValue = 0.0d; SIMONProperty Monster_Avoid_Value = new SIMONProperty (); Monster_Avoid_Value.PropertyName = "Monster_Avoid_Value"; Monster_Avoid_Value.PropertyValue = 0.0d; SIMONProperty Monster_Strength_Value = new SIMONProperty (); Monster_Strength_Value.PropertyName = "Monster_Strength_Value"; Monster_Strength_Value.PropertyValue = 0.0d; SIMONProperty Monster_Attack_Speed_Value = new SIMONProperty (); Monster_Attack_Speed_Value.PropertyName = "Monster_Attack_Speed_Value"; Monster_Attack_Speed_Value.PropertyValue = 0.0d; SIMONProperty Monster_Moving_Speed_Value = new SIMONProperty (); Monster_Moving_Speed_Value.PropertyName = "Monster_Moving_Speed_Value"; Monster_Moving_Speed_Value.PropertyValue = 0.0d; SIMONProperty Monster_Critical_Value = new SIMONProperty (); Monster_Critical_Value.PropertyName = "Monster_Critical_Value"; Monster_Critical_Value.PropertyValue = 0.0d; SIMONProperty Monster_Defensive_Value = new SIMONProperty (); Monster_Defensive_Value.PropertyName = "Monster_Defensive_Value"; Monster_Defensive_Value.PropertyValue = 0.0d; SIMONProperty Monster_CON_Value = new SIMONProperty (); Monster_CON_Value.PropertyName = "Monster_CON_Value"; Monster_CON_Value.PropertyValue = 0.0d; SIMONProperty Monster_Range_Value = new SIMONProperty (); Monster_Range_Value.PropertyName = "Monster_Range_Value"; Monster_Range_Value.PropertyValue = 0.0d; if (SimulationType == 1) { Strength.Inherit = true; Moving_Speed.Inherit = true; Attack_Speed.Inherit = true; Critical.Inherit = true; CON.Inherit = true; Range.Inherit = true; Defensive.Inherit = true; } sObject.Properties.Add (Strength); sObject.Properties.Add (Attack_Speed); sObject.Properties.Add (Moving_Speed); sObject.Properties.Add (Critical); sObject.Properties.Add (Defensive); sObject.Properties.Add (CON); sObject.Properties.Add (Range); sObject.Properties.Add (HP); sObject.Properties.Add (CurHp); sObject.Properties.Add (Type); sObject.Properties.Add (PositionX); sObject.Properties.Add (PositionY); sObject.Properties.Add (Target); sObject.Properties.Add (State); sObject.Properties.Add (ID); sObject.Properties.Add (AttackedCount); sObject.Properties.Add (Move_Target); sObject.Properties.Add (Attack_Target); sObject.Properties.Add (isCheck); sObject.Properties.Add (coolTime_Attack_Start); sObject.Properties.Add (Monster_Attack_Speed); sObject.Properties.Add (Monster_Skill_CoolTime); sObject.Properties.Add (Skill_number); sObject.Properties.Add (End); sObject.Properties.Add (Monster_Damage); sObject.Properties.Add (Monster_Moving_Speed); sObject.Properties.Add (Monster_Range); sObject.Properties.Add (Monster_Defensive); sObject.Properties.Add (Monster_Critical); sObject.Properties.Add (Monster_Sight); sObject.Properties.Add (Monster_Enemy_1); sObject.Properties.Add (Monster_Enemy_2); sObject.Properties.Add (Monster_Enemy_3); sObject.Properties.Add (Monster_Enemy_4); sObject.Properties.Add (Monster_Home_1); sObject.Properties.Add (Monster_Home_2); sObject.Properties.Add (Monster_Home_3); sObject.Properties.Add (Monster_Home_4); sObject.Properties.Add (Monster_Avoid_State); sObject.Properties.Add (Monster_Enemy_Total); sObject.Properties.Add (Monster_Home_Total); sObject.Properties.Add (Monster_Avoid_Time); sObject.Properties.Add (Monster_Total_Damage); sObject.Properties.Add (Monster_Enemy_Defensive); sObject.Properties.Add (Monster_Total_AttackedDamage); sObject.Properties.Add (Monster_Total_Defense); sObject.Properties.Add (Monster_Enemy_CurHp); sObject.Properties.Add (Monster_Total_AttackedCount); sObject.Properties.Add (Monster_Total_AttackCount); sObject.Properties.Add (Monster_Avoid_Value); sObject.Properties.Add (Monster_Strength_Value); sObject.Properties.Add (Monster_Attack_Speed_Value); sObject.Properties.Add (Monster_Moving_Speed_Value); sObject.Properties.Add (Monster_Critical_Value); sObject.Properties.Add (Monster_Defensive_Value); sObject.Properties.Add (Monster_CON_Value); sObject.Properties.Add (Monster_Range_Value); sObject.ObjectFitnessFunctionName = "ObjectFitness"; sObject.UpdatePropertyDNA (); SIMONAction propertyUpdate_Function = new SIMONAction (); propertyUpdate_Function.ActionFunctionName = "propertyUpdate" ; propertyUpdate_Function.ExecutionFunctionName = "Execution_propertyUpdate" ; propertyUpdate_Function.FitnessFunctionName = "FitnessFunction_propertyUpdate" ; propertyUpdate_Function.ActionName = "Update" ; SIMONAction Monster_Move = new SIMONAction (); Monster_Move.ActionFunctionName = "ActionFunction_Move" ; Monster_Move.ExecutionFunctionName = "Monster_Move" ; Monster_Move.FitnessFunctionName = "FitnessFunction_Move" ; Monster_Move.ActionName = "Move" ; SIMONAction Monster_Attack = new SIMONAction (); Monster_Attack.ActionFunctionName = "ActionFunction_Attack"; Monster_Attack.ExecutionFunctionName = "Monster_Attack" ; Monster_Attack.FitnessFunctionName = "FitnessFunction_Attack" ; Monster_Attack.ActionName = "Attack" ; SIMONAction Monster_Defense = new SIMONAction (); Monster_Defense.ActionFunctionName = "ActionFunction_Defense" ; Monster_Defense.ExecutionFunctionName = "Monster_Defense" ; Monster_Defense.FitnessFunctionName = "FitnessFunction_Defense" ; Monster_Defense.ActionName = "Defense" ; SIMONAction Monster_Avoid = new SIMONAction (); Monster_Avoid.ActionFunctionName = "ActionFunction_Avoid"; Monster_Avoid.ExecutionFunctionName = "Monster_Avoid"; Monster_Avoid.FitnessFunctionName = "FitnessFunction_Avoid"; Monster_Avoid.ActionName = "Avoid"; SIMONAction Monster_Skill_Strength = new SIMONAction (); Monster_Skill_Strength.ActionFunctionName = "ActionFunction_Skill_Strength" ; Monster_Skill_Strength.ExecutionFunctionName = "Monster_Skill_Strength" ; Monster_Skill_Strength.FitnessFunctionName = "FitnessFunction_Skill_Strength" ; Monster_Skill_Strength.ActionName = "Skill_Strength" ; SIMONProperty coolTime_Skill_Start_1 = new SIMONProperty (); coolTime_Skill_Start_1.PropertyName = "coolTime_Skill_Start_1"; coolTime_Skill_Start_1.PropertyValue =(double)Time.time; sObject.Properties.Add (coolTime_Skill_Start_1); SIMONAction Monster_Skill_Attack_Speed = new SIMONAction (); Monster_Skill_Attack_Speed.ActionFunctionName = "ActionFunction_Skill_Attack_Speed" ; Monster_Skill_Attack_Speed.ExecutionFunctionName = "Monster_Skill_Attack_Speed" ; Monster_Skill_Attack_Speed.FitnessFunctionName = "FitnessFunction_Skill_Attack_Speed" ; Monster_Skill_Attack_Speed.ActionName = "Skill_Attack_Speed" ; SIMONProperty coolTime_Skill_Start_2 = new SIMONProperty (); coolTime_Skill_Start_2.PropertyName = "coolTime_Skill_Start_2"; coolTime_Skill_Start_2.PropertyValue =(double)Time.time; sObject.Properties.Add (coolTime_Skill_Start_2); SIMONAction Monster_Skill_Moving_Speed = new SIMONAction (); Monster_Skill_Moving_Speed.ActionFunctionName = "ActionFunction_Skill_Moving_Speed" ; Monster_Skill_Moving_Speed.ExecutionFunctionName = "Monster_Skill_Moving_Speed" ; Monster_Skill_Moving_Speed.FitnessFunctionName = "FitnessFunction_Skill_Moving_Speed" ; Monster_Skill_Moving_Speed.ActionName = "Skill_Moving_Speed" ; SIMONProperty coolTime_Skill_Start_3 = new SIMONProperty (); coolTime_Skill_Start_3.PropertyName = "coolTime_Skill_Start_3"; coolTime_Skill_Start_3.PropertyValue =(double)Time.time; sObject.Properties.Add (coolTime_Skill_Start_3); SIMONAction Monster_Skill_Critical = new SIMONAction (); Monster_Skill_Critical.ActionFunctionName = "ActionFunction_Skill_Critical" ; Monster_Skill_Critical.ExecutionFunctionName = "Monster_Skill_Critical" ; Monster_Skill_Critical.FitnessFunctionName = "FitnessFunction_Skill_Critical" ; Monster_Skill_Critical.ActionName = "Skill_Critical" ; SIMONProperty coolTime_Skill_Start_4 = new SIMONProperty (); coolTime_Skill_Start_4.PropertyName = "coolTime_Skill_Start_4"; coolTime_Skill_Start_4.PropertyValue =(double)Time.time; sObject.Properties.Add (coolTime_Skill_Start_4); SIMONAction Monster_Skill_Defensive = new SIMONAction (); Monster_Skill_Defensive.ActionFunctionName = "ActionFunction_Skill_Defensive" ; Monster_Skill_Defensive.ExecutionFunctionName = "Monster_Skill_Defensive" ; Monster_Skill_Defensive.FitnessFunctionName = "FitnessFunction_Skill_Defensive" ; Monster_Skill_Defensive.ActionName = "Skill_Defensive" ; SIMONProperty coolTime_Skill_Start_5 = new SIMONProperty (); coolTime_Skill_Start_5.PropertyName = "coolTime_Skill_Start_5"; coolTime_Skill_Start_5.PropertyValue =(double)Time.time; sObject.Properties.Add (coolTime_Skill_Start_5); SIMONAction Monster_Skill_CON = new SIMONAction (); Monster_Skill_CON.ActionFunctionName = "ActionFunction_Skill_CON" ; Monster_Skill_CON.ExecutionFunctionName = "Monster_Skill_CON" ; Monster_Skill_CON.FitnessFunctionName = "FitnessFunction_Skill_CON" ; Monster_Skill_CON.ActionName = "Skill_CON" ; SIMONProperty coolTime_Skill_Start_6 = new SIMONProperty (); coolTime_Skill_Start_6.PropertyName = "coolTime_Skill_Start_6"; coolTime_Skill_Start_6.PropertyValue =(double)Time.time; sObject.Properties.Add (coolTime_Skill_Start_6); SIMONAction Monster_Skill_Range = new SIMONAction (); Monster_Skill_Range.ActionFunctionName = "ActionFunction_Skill_Range" ; Monster_Skill_Range.ExecutionFunctionName = "Monster_Skill_Range" ; Monster_Skill_Range.FitnessFunctionName = "FitnessFunction_Skill_Range" ; Monster_Skill_Range.ActionName = "Skill_Range" ; SIMONProperty coolTime_Skill_Start_7 = new SIMONProperty (); coolTime_Skill_Start_7.PropertyName = "coolTime_Skill_Start_7"; coolTime_Skill_Start_7.PropertyValue =(double)Time.time; sObject.Properties.Add (coolTime_Skill_Start_7); if (SimulationType == 2) { SIMONGene Update_Gene_A = new SIMONGene ("Update_Gene_A",(double)Random.Range(-100.0f,100.0f)); propertyUpdate_Function.InsertDNA(Update_Gene_A); SIMONGene Update_Gene_B = new SIMONGene ("Update_Gene_B",(double)Random.Range(-100.0f,100.0f)); propertyUpdate_Function.InsertDNA(Update_Gene_B); SIMONGene Update_Gene_C = new SIMONGene ("Update_Gene_C",(double)Random.Range(-100.0f,100.0f)); propertyUpdate_Function.InsertDNA(Update_Gene_C); SIMONGene Move_Gene_A = new SIMONGene ("Move_Gene_A",(double)Random.Range(-100.0f,100.0f)); Monster_Move.InsertDNA(Move_Gene_A); SIMONGene Move_Gene_C = new SIMONGene ("Move_Gene_C",(double)Random.Range(-100.0f,100.0f)); Monster_Move.InsertDNA(Move_Gene_C); SIMONGene Move_Gene_D = new SIMONGene ("Move_Gene_D",(double)Random.Range(-100.0f,100.0f)); Monster_Move.InsertDNA(Move_Gene_D); // SIMONGene Attack_Gene_A = new SIMONGene ("Attack_Gene_A",(double)Random.Range(-100.0f,100.0f)); Monster_Attack.InsertDNA(Attack_Gene_A); SIMONGene Attack_Gene_C = new SIMONGene ("Attack_Gene_C",(double)Random.Range(-100.0f,100.0f)); Monster_Attack.InsertDNA(Attack_Gene_C); SIMONGene Attack_Gene_D = new SIMONGene ("Attack_Gene_D",(double)Random.Range(-100.0f,100.0f)); Monster_Attack.InsertDNA(Attack_Gene_D); SIMONGene Defense_Gene_A = new SIMONGene ("Defense_Gene_A",(double)Random.Range(-100.0f,100.0f)); Monster_Defense.InsertDNA(Defense_Gene_A); SIMONGene Defense_Gene_B = new SIMONGene ("Defense_Gene_B",(double)Random.Range(-100.0f,100.0f)); Monster_Defense.InsertDNA(Defense_Gene_B); SIMONGene Defense_Gene_D = new SIMONGene ("Defense_Gene_D",(double)Random.Range(-100.0f,100.0f)); Monster_Defense.InsertDNA(Defense_Gene_D); SIMONGene Avoid_Gene_A = new SIMONGene ("Avoid_Gene_A",(double)Random.Range(-100.0f,100.0f)); Monster_Avoid.InsertDNA(Avoid_Gene_A); SIMONGene Avoid_Gene_B = new SIMONGene ("Avoid_Gene_B",(double)Random.Range(-100.0f,100.0f)); Monster_Avoid.InsertDNA(Avoid_Gene_B); SIMONGene Avoid_Gene_D = new SIMONGene ("Avoid_Gene_D",(double)Random.Range(-100.0f,100.0f)); Monster_Avoid.InsertDNA(Avoid_Gene_D); SIMONGene Strength_Gene_A = new SIMONGene ("Strength_Gene_A",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Strength.InsertDNA(Strength_Gene_A); SIMONGene Strength_Gene_B = new SIMONGene ("Strength_Gene_B",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Strength.InsertDNA(Strength_Gene_B); SIMONGene Strength_Gene_C = new SIMONGene ("Strength_Gene_C",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Strength.InsertDNA(Strength_Gene_C); SIMONGene Strength_Gene_D = new SIMONGene ("Strength_Gene_D",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Strength.InsertDNA(Strength_Gene_D); SIMONGene Attack_Speed_Gene_A = new SIMONGene ("Attack_Speed_Gene_A",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Attack_Speed.InsertDNA(Attack_Speed_Gene_A); SIMONGene Attack_Speed_Gene_B = new SIMONGene ("Attack_Speed_Gene_B",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Attack_Speed.InsertDNA(Attack_Speed_Gene_B); SIMONGene Attack_Speed_Gene_C = new SIMONGene ("Attack_Speed_Gene_C",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Attack_Speed.InsertDNA(Attack_Speed_Gene_C); SIMONGene Attack_Speed_Gene_D = new SIMONGene ("Attack_Speed_Gene_D",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Attack_Speed.InsertDNA(Attack_Speed_Gene_D); SIMONGene Moving_Speed_Gene_A = new SIMONGene ("Moving_Speed_Gene_A",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Moving_Speed.InsertDNA(Moving_Speed_Gene_A); SIMONGene Moving_Speed_Gene_B = new SIMONGene ("Moving_Speed_Gene_B",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Moving_Speed.InsertDNA(Moving_Speed_Gene_B); SIMONGene Moving_Speed_Gene_C = new SIMONGene ("Moving_Speed_Gene_C",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Moving_Speed.InsertDNA(Moving_Speed_Gene_C); SIMONGene Moving_Speed_Gene_D = new SIMONGene ("Moving_Speed_Gene_D",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Moving_Speed.InsertDNA(Moving_Speed_Gene_D); SIMONGene Critical_Gene_A = new SIMONGene ("Critical_Gene_A",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Critical.InsertDNA(Critical_Gene_A); SIMONGene Critical_Gene_B = new SIMONGene ("Critical_Gene_B",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Critical.InsertDNA(Critical_Gene_B); SIMONGene Critical_Gene_C = new SIMONGene ("Critical_Gene_C",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Critical.InsertDNA(Critical_Gene_C); SIMONGene Critical_Gene_D = new SIMONGene ("Critical_Gene_D",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Critical.InsertDNA(Critical_Gene_D); SIMONGene Defensive_Gene_A = new SIMONGene ("Defensive_Gene_A",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Defensive.InsertDNA(Defensive_Gene_A); SIMONGene Defensive_Gene_B = new SIMONGene ("Defensive_Gene_B",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Defensive.InsertDNA(Defensive_Gene_B); SIMONGene Defensive_Gene_C = new SIMONGene ("Defensive_Gene_C",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Defensive.InsertDNA(Defensive_Gene_C); SIMONGene Defensive_Gene_D = new SIMONGene ("Defensive_Gene_D",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Defensive.InsertDNA(Defensive_Gene_D); SIMONGene CON_Gene_A = new SIMONGene ("CON_Gene_A",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_CON.InsertDNA(CON_Gene_A); SIMONGene CON_Gene_B = new SIMONGene ("CON_Gene_B",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_CON.InsertDNA(CON_Gene_B); SIMONGene CON_Gene_C = new SIMONGene ("CON_Gene_C",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_CON.InsertDNA(CON_Gene_C); SIMONGene CON_Gene_D = new SIMONGene ("CON_Gene_D",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_CON.InsertDNA(CON_Gene_D); SIMONGene Range_Gene_A = new SIMONGene ("Range_Gene_A",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Range.InsertDNA(Range_Gene_A); SIMONGene Range_Gene_B = new SIMONGene ("Range_Gene_B",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Range.InsertDNA(Range_Gene_B); SIMONGene Range_Gene_C = new SIMONGene ("Range_Gene_C",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Range.InsertDNA(Range_Gene_C); SIMONGene Range_Gene_D = new SIMONGene ("Range_Gene_D",(double)Random.Range(-100.0f,100.0f)); Monster_Skill_Range.InsertDNA(Range_Gene_D); } // // sObject.Actions.Add(propertyUpdate_Function); sObject.Actions.Add(Monster_Move); sObject.Actions.Add(Monster_Attack); sObject.Actions.Add(Monster_Defense); sObject.Actions.Add(Monster_Avoid); sObject.Actions.Add(Monster_Skill_Strength); sObject.Actions.Add(Monster_Skill_Attack_Speed); sObject.Actions.Add(Monster_Skill_Moving_Speed); sObject.Actions.Add(Monster_Skill_Critical); sObject.Actions.Add(Monster_Skill_Defensive); sObject.Actions.Add(Monster_Skill_CON); sObject.Actions.Add(Monster_Skill_Range); // SIMON.GlobalSIMON.InsertSIMONObject(sObject); SIMONFunction propertyUpdate_Name = PropertyUpdate; SIMONFunction ExecutionFunction_propertyUpdate_Name = PropertyUpdate_Exection; SIMONFunction FitnessFunction_propertyUpdate_Name = PropertyUpdate_FitnessFunction; SIMONFunction ActionFunction_Move_Name = ActionFunction_Move; SIMONFunction ExecutionFunction_Move_Name = Monster_move; SIMONFunction FitnessFunction_Move_Name = FitnessFunction_Move; SIMONFunction ActionFunction_Attack_Name = ActionFunction_Attack; SIMONFunction ExecutionFunction_Attack_Name = Monster_attack; SIMONFunction FitnessFunction_Attack_Name = FitnessFunction_Attack; SIMONFunction ActionFunction_Defense_Name = ActionFunction_Defense; SIMONFunction ExecutionFunction_Defense_Name = Monster_defense; SIMONFunction FitnessFunction_Defense_Name = FitnessFunction_Defense; SIMONFunction ActionFunction_Avoid_Name = ActionFunction_Avoid; SIMONFunction ExecutionFunction_Avoid_Name = Monster_avoid; SIMONFunction FitnessFunction_Avoid_Name = FitnessFunction_Avoid; // SIMONFunction ActionFunction_Skill_Strength_Name = ActionFunction_Skill_Strength; SIMONFunction ExecutionFunction_Skill_Strength_Name = monster_Skill_Strength; SIMONFunction FitnessFunction_Skill_Strength_Name = FitnessFunction_Skill_Strength; SIMONFunction ActionFunction_Skill_Attack_Speed_Name = ActionFunction_Skill_Attack_Speed; SIMONFunction ExecutionFunction_Skill_Skill_Attack_Speed_Name = monster_Skill_Attack_Speed; SIMONFunction FitnessFunction_Skill_Attack_Speed_Name = FitnessFunction_Skill_Attack_Speed; SIMONFunction ActionFunction_Skill_Moving_Speed_Name = ActionFunction_Skill_Moving_Speed; SIMONFunction ExecutionFunction_Skill_Skill_Moving_Speed_Name = monster_Skill_Moving_Speed; SIMONFunction FitnessFunction_Skill_Moving_Speed_Name = FitnessFunction_Skill_Moving_Speed; SIMONFunction ActionFunction_Skill_Critical_Name = ActionFunction_Skill_Critical; SIMONFunction ExecutionFunction_Skill_Skill_Critical_Name = monster_Skill_Critical; SIMONFunction FitnessFunction_Skill_Critical_Name = FitnessFunction_Skill_Critical; SIMONFunction ActionFunction_Skill_Defensive_Name = ActionFunction_Skill_Defensive; SIMONFunction ExecutionFunction_Skill_Skill_Defensive_Name = monster_Skill_Defensive; SIMONFunction FitnessFunction_Skill_Defensive_Name = FitnessFunction_Skill_Defensive; SIMONFunction ActionFunction_Skill_CON_Name = ActionFunction_Skill_CON; SIMONFunction ExecutionFunction_Skill_Skill_CON_Name = monster_Skill_CON; SIMONFunction FitnessFunction_Skill_CON_Name = FitnessFunction_Skill_CON; SIMONFunction ActionFunction_Skill_Range_Name = ActionFunction_Skill_Range; SIMONFunction ExecutionFunction_Skill_Skill_Range_Name = monster_Skill_Range; SIMONFunction FitnessFunction_Skill_Range_Name = FitnessFunction_Skill_Range; // SIMON.GlobalSIMON.InsertSIMONMethod("propertyUpdate", propertyUpdate_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Execution_propertyUpdate" , ExecutionFunction_propertyUpdate_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_propertyUpdate" , FitnessFunction_propertyUpdate_Name); SIMON.GlobalSIMON.InsertSIMONMethod("ActionFunction_Move" , ActionFunction_Move_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Monster_Move" , ExecutionFunction_Move_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_Move" , FitnessFunction_Move_Name); SIMON.GlobalSIMON.InsertSIMONMethod("ActionFunction_Attack" , ActionFunction_Attack_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Monster_Attack" , ExecutionFunction_Attack_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_Attack" , FitnessFunction_Attack_Name); SIMON.GlobalSIMON.InsertSIMONMethod("ActionFunction_Defense" , ActionFunction_Defense_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Monster_Defense" , ExecutionFunction_Defense_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_Defense" , FitnessFunction_Defense_Name); SIMON.GlobalSIMON.InsertSIMONMethod("ActionFunction_Avoid" , ActionFunction_Avoid_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Monster_Avoid" , ExecutionFunction_Avoid_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_Avoid" , FitnessFunction_Avoid_Name); // SIMON.GlobalSIMON.InsertSIMONMethod("ActionFunction_Skill_Strength" , ActionFunction_Skill_Strength_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Monster_Skill_Strength" , ExecutionFunction_Skill_Strength_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_Skill_Strength" , FitnessFunction_Skill_Strength_Name); SIMON.GlobalSIMON.InsertSIMONMethod("ActionFunction_Skill_Attack_Speed" , ActionFunction_Skill_Attack_Speed_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Monster_Skill_Attack_Speed" , ExecutionFunction_Skill_Skill_Attack_Speed_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_Skill_Attack_Speed" , FitnessFunction_Skill_Attack_Speed_Name); SIMON.GlobalSIMON.InsertSIMONMethod("ActionFunction_Skill_Moving_Speed" , ActionFunction_Skill_Moving_Speed_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Monster_Skill_Moving_Speed" , ExecutionFunction_Skill_Skill_Moving_Speed_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_Skill_Moving_Speed" , FitnessFunction_Skill_Moving_Speed_Name); SIMON.GlobalSIMON.InsertSIMONMethod("ActionFunction_Skill_Critical" , ActionFunction_Skill_Critical_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Monster_Skill_Critical" , ExecutionFunction_Skill_Skill_Critical_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_Skill_Critical" , FitnessFunction_Skill_Critical_Name); SIMON.GlobalSIMON.InsertSIMONMethod("ActionFunction_Skill_Defensive" , ActionFunction_Skill_Defensive_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Monster_Skill_Defensive" , ExecutionFunction_Skill_Skill_Defensive_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_Skill_Defensive" , FitnessFunction_Skill_Defensive_Name); SIMON.GlobalSIMON.InsertSIMONMethod("ActionFunction_Skill_CON" , ActionFunction_Skill_CON_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Monster_Skill_CON" , ExecutionFunction_Skill_Skill_CON_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_Skill_CON" , FitnessFunction_Skill_CON_Name); SIMON.GlobalSIMON.InsertSIMONMethod("ActionFunction_Skill_Range" , ActionFunction_Skill_Range_Name); SIMON.GlobalSIMON.InsertSIMONMethod("Monster_Skill_Range" , ExecutionFunction_Skill_Skill_Range_Name); SIMON.GlobalSIMON.InsertSIMONMethod("FitnessFunction_Skill_Range" , FitnessFunction_Skill_Range_Name); // setTotalHP((float)sObject.GetPropertyElement("HP")); curDirection = 3; isSkill = false; }