public override void InitialiseDecision() { if (selectionCircle != null) { //EndCurrentSelection(); if (abilitySelected) { if (abilityConfirm) { ChangeColourToAbilityConfirmed(); (abilitySelected as CharacterEffectAbility).SetTargetCharacter(GetComponent <Character>()); playerCharacter.GetCombatController().SetCurrentEnemyTarget(GetComponent <Character>()); combatUI.ConfirmAbility(); abilityConfirm = false; print("enemy selected"); } else if (abilityInRange) { print("abilityConfirm"); abilityConfirm = true; Select(); } } else { print("ability not selected"); if (GetComponent <Character>().GetCombatController() != null) { if (GetComponent <Character>().GetCombatController().GetCurrentEnemyTarget() == playerCharacter) { playerCharacter.GetCombatController().SetCurrentEnemyTarget(GetComponent <Character>()); BuildSelectionPlayerDecision(moveToEnemyDecisionPrefab); CharacterMovementDecision movementDecision = (CharacterMovementDecision)myDecision; movementDecision.InitialiseMe(selectionCircle.transform, doubleClicks); } else { BuildSelectionPlayerDecision(DefaultSelectionDecisionPrefab); CharacterMovementDecision movementDecision = (CharacterMovementDecision)myDecision; movementDecision.InitialiseMe(selectionCircle.transform, doubleClicks); } } else { BuildSelectionPlayerDecision(DefaultSelectionDecisionPrefab); CharacterMovementDecision movementDecision = (CharacterMovementDecision)myDecision; print(selectionCircle); movementDecision.InitialiseMe(selectionCircle.transform, doubleClicks); } //clicked = true; QueueDecisionToRun(); } print("end of set selected"); } }
public override void InitialiseAction(Character charIn) { myCharacter = charIn; print(myAction); myDecision = myAction.GetComponent <CharacterDecision>(); print(myDecision); myDecision.InitialiseMe(myCharacter); CharacterMovementDecision myMovementDecision = (CharacterMovementDecision)myDecision; myMovementDecision.InitialiseMe(myCharacter.GetCombatController().CurrentEnemyTarget.transform, true); }
public override void InitialiseDecision() { if (abilitySelected == null) { BuildCircle(MouseSelection.GetMouseCoords2D()); BuildSelectionPlayerDecision(DefaultSelectionDecisionPrefab); CharacterMovementDecision movementDecision = (CharacterMovementDecision)myDecision; movementDecision.InitialiseMe(selectionCircle.transform, doubleClicks); QueueDecisionToRun(); } }
public override void InitialiseDecision() { if (abilitySelected == null) { BuildCircle(); Debug.Log(selectionCircle.gameObject.transform.position); BuildSelectionPlayerDecision(DefaultSelectionDecisionPrefab); CharacterMovementDecision movementDecision = (CharacterMovementDecision)myDecision; movementDecision.InitialiseMe(selectionCircle.transform, doubleClicks); QueueDecisionToRun(); } }