public void ClickFor(ClickToMoveFollower follower, RaycastHit rh) { if (!follower.enabled) { return; } follower.SetCurrentTarget(rh.point, rh.normal); follower.UpdateLine(); }
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); }
public void SetFollower(CharacterMove target) { follower = Follower(target); }