コード例 #1
0
 // Start is called before the first frame update
 void Start()
 {
     targetPos      = new Vector2(transform.position.x, targetY);
     anim           = GetComponent <Animator>();
     predatorHealth = GetComponent <PredatorHealth>();
     shootCounter   = animTime;
 }
コード例 #2
0
 // Start is called before the first frame update
 void Start()
 {
     predatorHealth = GetComponent <PredatorHealth>();
     startTime      = Time.time + Random.Range(0, xSpeed * 2);
     minX           = transform.position.x - xRange;
     maxX           = transform.position.x + xRange;
     xPos           = transform.position.x;
     yPos           = transform.position.y;
 }