Exemple #1
0
            public static void ExtDefollow(this PeEntity entity)
            {
                FollowCmpt f = entity.GetCmpt <FollowCmpt>();

                if (null == f)
                {
                    return;
                }

                f.Defollow();
            }
Exemple #2
0
            public static void ExtSetSetPosDis(this PeEntity entity, float dis)
            {
                FollowCmpt f = entity.GetCmpt <FollowCmpt>();

                if (null == f)
                {
                    return;
                }

                f.setPosDis = dis;
            }
Exemple #3
0
            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);
            }