private void OnMouseUp() { switch (UI_values.Step) { case UI_Manager_script.StepType.Intel: //Phase 2 Step Intel HUD2Value.Intel_UI_update(this.gameObject); break; case UI_Manager_script.StepType.DefineAttacker: //Phase 2 Step Attack A if (type == BuildingType.Attack) { HUD2Value.Attack_A_UI_update(this.gameObject); //Phase 2 Step Attack B } break; case UI_Manager_script.StepType.DefineAttacked: //Owner must be verified //NOT a CITY must be verified HUD2Value.Attack_B_UI_update(this.gameObject); break; case UI_Manager_script.StepType.DefineSelfDestruct: string description = type + "\n" + "\r" + //type "Chance : 87%" + "" + "\n" + "\r" + // proba fixe de 87% (ne pas faire 1 sur un dé à 6 faces) Owner + "\n" + "\r" + //Owner health + "\n" + "\r" + //health Effect; HUD2Value.SD_UI_update("none", description, this.gameObject); break; default: break; } }
private void OnMouseUp() { //Phase 1 Step Case selection for unit if (UI_values.Phase_number == 1 && UI_values.Step == UI_Manager_script.StepType.Token_creation_case) { //Check if case is free if (Occupation == OccupationType.Free) { //Check if valid building is near if (true /*HasCaseAnAdjacentAllyBuilding()*/) { //Send Case adress to GameManager (HUD1) HUD1Value.Unit_Deployment(this.gameObject); } } } //Phase 2 Step Intel if (UI_values.Phase_number == 2 && UI_values.Step == UI_Manager_script.StepType.Intel) { HUD2Value.Intel_UI_update(this.gameObject); } //Phase 2 Step Move B if (UI_values.Phase_number == 2 && UI_values.Step == UI_Manager_script.StepType.DefineDestination) { if (Occupation == OccupationType.Free) //Case must be free { GameObject Voyager = HUD2Value.ElementA; Unit_script Voyager_values = Voyager.GetComponent <Unit_script>(); //Debug.Log(Voyager.name); Case_script Origin_Case = Voyager_values.Occupied_case.GetComponent <Case_script>(); if (CheckVoisine(Origin_Case)) //Case must be adjacente { HUD2Value.Move_B_UI_update(this.gameObject); } else { Debug.Log("This case is not a good choice"); } } else { Debug.Log("Destination is not free"); } } }