public void OverrideLocomoteWithAgentFreeToTransform(LocomoteWithAgentFreeToTransformParams param, short priority, string id) { LocomTypeDict.Override(id, priority, param); if (LocomTypeDict.LastId == id) { ToAgentFreeToTransform(param); } }
private void ToAgentFreeToTransform(LocomoteWithAgentFreeToTransformParams param) { LayerWeightTarget = 1; LocomType = PredefinedLocomType.WithNavmesh; TurnToTransform = null; //rb.isKinematic = true; MoveToTransformWithAgent = param.MoveToTransform; agent.enabled = true; StartLocomotionWithAgent(param.MoveType, param.MoveToTransform.position); if (param.LocomStyleIndex >= 0) { SetLocomotionStyle(param.LocomStyleIndex); } else { SetLocomotionStyle(player.defaultLocomStyleIndex); Debug.Log("No locomotion style found with this index, default will be used!"); } }