public static void ExtDefollow(this PeEntity entity) { FollowCmpt f = entity.GetCmpt <FollowCmpt>(); if (null == f) { return; } f.Defollow(); }
public static void ExtSetSetPosDis(this PeEntity entity, float dis) { FollowCmpt f = entity.GetCmpt <FollowCmpt>(); if (null == f) { return; } f.setPosDis = dis; }
public static void ExtFollow(this PeEntity entity, PeEntity target) { if (null == target || entity == null) { return; } FollowCmpt f = entity.GetCmpt <FollowCmpt>(); if (null == f) { f = entity.Add <FollowCmpt>(); } PeTrans targetTrans = target.peTrans; if (null == targetTrans) { return; } f.Follow(targetTrans); }