| 123456789101112131415161718192021 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- /**狼到终点的引导线绘制,调试用的,配合WolfActGrid */
- public class WolfLineRender : MonoBehaviour
- {
- LineRenderer lineRenderer;
- void Awake() {
- lineRenderer = GetComponent<LineRenderer>();
- }
- void Update() {
- Vector3 src = transform.position;
- lineRenderer.SetPosition(0, src);
- }
- public void SetDestination(Vector3 des) {
- lineRenderer.SetPosition(1, des);
- }
- }
|