internal override void OnDestroy() { base.OnDestroy(); if (Entity != null && follow != null) { Entity.DelComponent(follow); follow.OnDestroy(); follow = null; } }
internal override void OnTrigger() { base.OnTrigger(); UnityEngine.Transform attachNode = Entity.GetBindPoint(mAttachNode); List <Entity> listTarget = this.EntityAct.TargetList; if (attachNode != null && listTarget.Count > 0) { follow = listTarget[0].AddComponent <GOEEntityFollowTransform>(); follow.MaxTime = MaxTime; follow.Target = attachNode; } }