コード例 #1
0
 private void Start()
 {
     _controller = GetComponent <FishAgentController>();
     //range check
     if (repulsionRange > alignmentRange || alignmentRange > attractionRange || repulsionRange > attractionRange)
     {
         throw new ArgumentOutOfRangeException("", "Ranges misplaced");
     }
     if (maxVelocity <= 0)
     {
         throw new ArgumentOutOfRangeException(paramName: "", message: "maxVlocity should be >0");
     }
 }
コード例 #2
0
        private void Start()
        {
            _stress = initialStress;

            _controller = GetComponent <FishAgentController>();
        }
コード例 #3
0
 private void Start()
 {
     _dist       = float.NegativeInfinity;
     _controller = GetComponent <FishAgentController>();
 }