public Trouble Use(Action p_CallBack, CharacterController p_User) { if (p_User.CurrentEq != null) { ActiveTrouble.Deal(p_CallBack, p_User.CurrentEq.Etype); } else if (ActiveTrouble.Requisite == Equipment.EquipmentType.Nill) { ActiveTrouble.Deal(p_CallBack, Equipment.EquipmentType.Nill); } return(ActiveTrouble); }
// Function is called from player while the player holds the primary button. private Trouble ProgressTrigger(Action p_Callback, Equipment p_UsedEquipment) { Color transGreen = Color.green; transGreen.a = 0.2f; GetComponent <MeshRenderer>().material.color = transGreen; // Progress is made in Trouble class. if (p_UsedEquipment != null) { ActiveTrouble.Deal(p_Callback, p_UsedEquipment.Etype); } else { ActiveTrouble.Deal(p_Callback, Equipment.EquipmentType.Nill); } return(ActiveTrouble); }