public override bool InitializeTrigger(CustomTriggerData data, List <Transform> transforms) { Log("Initializing animation trigger parameter " + data.animationTriggerData.animatorValueId + " for " + data.customReferenceId); if (transforms.Count != 2) { Debug.LogError("AnimationTriggers should have 2 transforms in the CustomReference. [1] Trigger Volume [2] Animator"); return(false); } animator = transforms[1].gameObject.GetComponent <Animator>(); if (animator == null) { Debug.LogError("AnimationTrigger for " + data.customReferenceId + " is missing an Animator on the second transform"); return(false); } return(true); }
public override bool InitializeTrigger(CustomTriggerData data, List <Transform> transforms) { return(true); }
abstract public bool InitializeTrigger(CustomTriggerData triggerData, List <Transform> transforms);
public bool Initialize(CustomTriggerData triggerData, List <Transform> transforms) { data = triggerData; return(InitializeTrigger(triggerData, transforms)); }