private void UpdateMovementValues(MovementMagicCircle mmc) { switch (mmc.GetMovement()) { case MovementType.Control: { movementData.SetMaxForce(50); movementData.SetMinForce(0); break; } case MovementType.Path: { goto case MovementType.Control; } case MovementType.Push: { movementData.SetMaxForce(5); movementData.SetMinForce(-5); break; } default: { goto case MovementType.Push; } } }
public void OnMovementUILoad() { // public UnityEngine.UI.Slider initialVelocity; // public UnityEngine.UI.InputField initialVelocityInput; // public UnityEngine.UI.Slider force; // public UnityEngine.UI.InputField forceInput; // public UnityEngine.UI.Slider angle; // public UnityEngine.UI.InputField angleInput; // public UnityEngine.UI.Toggle dragMagic; // public Dropdown movement; MovementMagicCircle mmc = (MovementMagicCircle)selectedSpellNode; if (mmc != null) { UpdateMovementValues(mmc); movementData.SetInitialVelocity(mmc.initialVelocity.Value()); movementData.SetForce(mmc.force.Value()); movementData.SetAngle(mmc.directionAngle.Value()); movementData.SetMovement(mmc.GetMovement()); movementData.dragMagic.isOn = mmc.dragMagic; } }