Behaviours
BxDifficultyAdjuster Class Reference

Public Member Functions

void SetValue (float normalizedValue=0.5f)
 Sets the adjuster's valu, moving objects according to a normalized value More...
 

Static Public Member Functions

static void SetGlobalDifficulty (float normalizedValue)
 Sets the global difficulty. More...
 
static bool AddAdjuster (string ref0Name, string ref1Name, string[] objectsNames, bool hideReferences=true)
 Adds an adjuster. IMPORTANT NOTE: At the initialization, objects must be positioned relative to the "easy" (ref0) object More...
 

Static Public Attributes

static List< BxDifficultyAdjusters_adjusters = new List<BxDifficultyAdjuster>()
 Global adjusters list.
 

Protected Attributes

GameObject m_ref0 = null
 
GameObject[] m_objects = null
 
float m_lastValue = 0f
 

Member Function Documentation

static bool BxDifficultyAdjuster.AddAdjuster ( string  ref0Name,
string  ref1Name,
string[]  objectsNames,
bool  hideReferences = true 
)
static

Adds an adjuster. IMPORTANT NOTE: At the initialization, objects must be positioned relative to the "easy" (ref0) object

Parameters
ref0NameName of the reference object for "easy" (start position)
ref1NameName of the reference object for "hard" (end position)
objectsObjects to be moved from "easy" to "hard"
hideReferencesif true(default), the reference objects will be hidden and removed from physics colliders. Set to false to leave enabled.
Returns
Success flag: added only if all objects have been found
static void BxDifficultyAdjuster.SetGlobalDifficulty ( float  normalizedValue)
static

Sets the global difficulty.

Parameters
normalizedValueValue between 0 ("easy") and 1 ("hard")
void BxDifficultyAdjuster.SetValue ( float  normalizedValue = 0.5f)

Sets the adjuster's valu, moving objects according to a normalized value

Parameters
normalizedValueValue between 0 ("easy") and 1 ("hard")

The documentation for this class was generated from the following file: