//change stance and set the function pointer to the mode it should be using now public void change_stance(Stance given_stance){ //set the stance this.stance = given_stance; //set the delegate if(this.stance == Stance.Attack){ this.stance_delegate = new Ability_Delegate (attack); } else if(this.stance == Stance.Defend){ this.stance_delegate = new Ability_Delegate (defend); } else if(this.stance == Stance.Support){ this.stance_delegate = new Ability_Delegate (support); } }
//change stance and set the function pointer to the mode it should be using now public void change_stance(Stance given_stance) { //set the stance this.stance = given_stance; //set the delegate if (this.stance == Stance.Attack) { this.stance_delegate = new Ability_Delegate(attack); } else if (this.stance == Stance.Defend) { this.stance_delegate = new Ability_Delegate(defend); } else if (this.stance == Stance.Support) { this.stance_delegate = new Ability_Delegate(support); } }