コード例 #1
0
ファイル: PointManager.cs プロジェクト: Tayl1r/yoghurt
 // Update is called once per frame
 void Update()
 {
     if (currentPoint == null)
     {
         return;
     }
     Debug.DrawLine(player.transform.position, currentPoint.transform.position, Color.blue);
     if (Vector3.Distance(player.transform.position, currentPoint.transform.position) < pointSize)
     {
         allPoints.Remove(currentPoint);
         currentPoint.StopVFX();
         if (allPoints.Count == 0)
         {
             currentPoint = null;
             Debug.Log("complete");
         }
         else
         {
             Debug.Log("new point");
             currentPoint = GetNewPoint();
             currentPoint.StartVFX();
         }
     }
 }
コード例 #2
0
ファイル: PointManager.cs プロジェクト: Tayl1r/yoghurt
 // Start is called before the first frame update
 void Start()
 {
     currentPoint = GetNewPoint();
     currentPoint.StartVFX();
 }