RtkTest.cs 550 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class RtkTest : MonoBehaviour
  5. {
  6. public bool state;
  7. public Vector2 testPos;
  8. public RtkPos rtkPos;
  9. public RtkTrigger rtkTrigger;
  10. void Update()
  11. {
  12. if(!rtkTrigger.finish)
  13. if(state)
  14. {
  15. Vector2 pos = testPos + new Vector2(Random.Range(1, 10) / 10.0f, Random.Range(1, 5) / 10.0f)-new Vector2(API_SVR.GetHead().position.x,API_SVR.GetHead().position.z);
  16. rtkPos.SettingPos(pos);
  17. }
  18. }
  19. }