public EffectorInitializer(EffectorType effectorType, Dictionary <string, string> parameters, ElementType elementType, int id, Vector2 position, float angle) : base(elementType, id, position, angle) { _effectorType = effectorType; _parameters = parameters; }
static _EffectorFlags _GetEffectorFlags(EffectorType effectorType) { switch (effectorType) { case EffectorType.Hips: return(_EffectorFlags.RotationContained | _EffectorFlags.PullContained); case EffectorType.Neck: return(_EffectorFlags.PullContained); case EffectorType.Head: return(_EffectorFlags.RotationContained | _EffectorFlags.PullContained); case EffectorType.Eyes: return(_EffectorFlags.PullContained); case EffectorType.Arm: return(_EffectorFlags.PullContained); case EffectorType.Wrist: return(_EffectorFlags.RotationContained | _EffectorFlags.PullContained); case EffectorType.Foot: return(_EffectorFlags.RotationContained | _EffectorFlags.PullContained); case EffectorType.Elbow: return(_EffectorFlags.PullContained); case EffectorType.Knee: return(_EffectorFlags.PullContained); } return(_EffectorFlags.None); }
void _PresetEffectorLocation(EffectorLocation effectorLocation) { _isPresetted = true; _effectorLocation = effectorLocation; _effectorType = ToEffectorType(effectorLocation); _effectorFlags = _GetEffectorFlags(_effectorType); }
static float _GetPresetPositionWeight(EffectorType effectorType) { switch (effectorType) { case EffectorType.Arm: return(0.0f); } return(1.0f); }
static bool _GetPresetPositionEnabled(EffectorType effectorType) { switch (effectorType) { case EffectorType.Wrist: return(true); case EffectorType.Foot: return(true); } return(false); }
static float _GetPresetPull(EffectorType effectorType) { switch (effectorType) { case EffectorType.Hips: return(1.0f); case EffectorType.Eyes: return(1.0f); case EffectorType.Arm: return(1.0f); case EffectorType.Wrist: return(1.0f); case EffectorType.Foot: return(1.0f); } return(0.0f); }
static _EffectorFlags _GetEffectorFlags( EffectorType effectorType ) { switch( effectorType ) { case EffectorType.Hips: return _EffectorFlags.RotationContained | _EffectorFlags.PullContained; case EffectorType.Neck: return _EffectorFlags.PullContained; case EffectorType.Head: return _EffectorFlags.RotationContained | _EffectorFlags.PullContained; case EffectorType.Eyes: return _EffectorFlags.PullContained; case EffectorType.Arm: return _EffectorFlags.PullContained; case EffectorType.Wrist: return _EffectorFlags.RotationContained | _EffectorFlags.PullContained; case EffectorType.Foot: return _EffectorFlags.RotationContained | _EffectorFlags.PullContained; case EffectorType.Elbow: return _EffectorFlags.PullContained; case EffectorType.Knee: return _EffectorFlags.PullContained; } return _EffectorFlags.None; }
static float _GetPresetPull( EffectorType effectorType ) { switch( effectorType ) { case EffectorType.Hips: return 1.0f; case EffectorType.Eyes: return 1.0f; case EffectorType.Arm: return 1.0f; case EffectorType.Wrist: return 1.0f; case EffectorType.Foot: return 1.0f; } return 0.0f; }
static float _GetPresetPositionWeight( EffectorType effectorType ) { switch( effectorType ) { case EffectorType.Arm: return 0.0f; } return 1.0f; }
static bool _GetPresetPositionEnabled( EffectorType effectorType ) { switch( effectorType ) { case EffectorType.Wrist: return true; case EffectorType.Foot: return true; } return false; }
void _PresetEffectorLocation( EffectorLocation effectorLocation ) { _isPresetted = true; _effectorLocation = effectorLocation; _effectorType = ToEffectorType( effectorLocation ); _effectorFlags = _GetEffectorFlags( _effectorType ); }
public void SetValues(string key, float value, EffectorType _type) { s = key; f = value; type = _type; }
/// <summary> /// Returns a copy of GameObject mapped to the EffectorType value /// </summary> /// <param name="type">The to search for type</param> /// <returns>A newly initiated GameObject</returns> public GameObject getEffectorByType(EffectorType type) { _effectorTypePrefabMap.TryGetValue(type, out var returnPrefab); return(Instantiate(returnPrefab)); }