コード例 #1
0
ファイル: SheepAgent.cs プロジェクト: Ninjars/unity-islands
 void Awake()
 {
     base.init();
     audioSource   = GetComponent <AudioSource>();
     legController = GetComponent <AutonomousLegomatic>();
     initialObjPos = body.localPosition;
     foodHits      = new Collider[5];
 }
コード例 #2
0
 void Awake()
 {
     base.init();
     audioSource   = GetComponent <AudioSource>();
     legController = GetComponent <AutonomousLegomatic>();
     initialObjPos = body.localPosition;
     if (voiceIndex < 0)
     {
         setVoice(UnityEngine.Random.Range(0, sheepSounds.sounds.Count));
     }
     baaInterval = UnityEngine.Random.Range(minBaaInterval, maxBaaInterval) * 0.5f;
     foodHits    = new Collider[5];
 }