Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        target.z       = 0;
        managerObj     = GameObject.Find("flockingFishManager").GetComponent <flockingFishManager>();
        thisFishAction = gameObject.GetComponent <FlockingFishBasicAction>();

        rotateAngle = Random.Range(managerObj.limitRotateAngle.x, managerObj.limitRotateAngle.y);
        thinkGap    = Random.Range(managerObj.limitThinkGap.x, managerObj.limitThinkGap.y);

        moveVector = Random.insideUnitSphere;

        curTime = thinkGap;

        lerpDirAngle = Random.Range(managerObj.limitLerpDirAngle.x, managerObj.limitLerpDirAngle.y);
    }
Beispiel #2
0
 void Reset()
 {
     managerObj = GameObject.Find("flockingFishManager").GetComponent <flockingFishManager>(  );
 }