Exemplo n.º 1
0
 public virtual void AttractBait()
 {
     if (this.m_CurrentFishController == null)
     {
         var inRangeFishs = Physics.OverlapSphere(this.GetFitPosition(), this.m_Data.baitRange, this.m_FishLayerMask);
         if (inRangeFishs.Length > 0)
         {
             var random = UnityEngine.Random.Range(0, inRangeFishs.Length);
             var fish   = inRangeFishs [random];
             this.m_CurrentFishController = fish.GetComponent <CSimpleFishController> ();
         }
     }
     if (this.m_CurrentFishController != null)
     {
         if (this.m_CurrentFishController.GetBait() == null)
         {
             this.m_CurrentFishController.SetBait(this);
         }
         this.m_CurrentFishController.SetBaitRatio(this.m_Data.baitValue);
     }
 }
Exemplo n.º 2
0
 public FSMFishIdleState(IContext context) : base(context)
 {
     this.m_Controller = context as CSimpleFishController;
 }