protected override void OnInit() { vitals = Agent.Owner.GetComponent <Drone>()?.Vitals; if (vitals == null) { Debug.LogError("No vitals object found on " + Agent.Owner.name); } }
public override bool CheckComponents() { if (vitals == null) { vitals = Agent.Owner.GetComponent <Drone>().Vitals; } return(vitals != null); }