示例#1
0
 public void ClickFor(ClickToMoveFollower follower, RaycastHit rh)
 {
     if (!follower.enabled)
     {
         return;
     }
     follower.SetCurrentTarget(rh.point, rh.normal);
     follower.UpdateLine();
 }
示例#2
0
        public ClickToMoveFollower Follower(CharacterMove currentChar)
        {
            ClickToMoveFollower follower = currentChar.GetComponent <ClickToMoveFollower>();

            if (follower == null)
            {
                follower = currentChar.gameObject.AddComponent <ClickToMoveFollower>();
                follower.clickToMoveUi = this;
                ParticleSystem ps = currentChar.GetComponentInChildren <ParticleSystem>();
                if (ps != null)
                {
                    ParticleSystem.MainModule m = ps.main;
                    follower.color = m.startColor.color;
                }
                follower.Init(currentChar.gameObject);
            }
            return(follower);
        }
示例#3
0
 public void SetFollower(CharacterMove target)
 {
     follower = Follower(target);
 }