Ejemplo n.º 1
0
    public void SetOnColliderEnter(Collider other)
    {
        bool checkPath = false;

        for (int i = 0; i < Fishs.Count; i++)
        {
            if (Fishs[i].Fish == other.gameObject)
            {
                if (Fishs[i].statePath == StatePath.Feed)
                {
                    checkPath = true;
                }
            }
        }
        if (checkPath && settingCatch)
        {
            for (int i = 0; i < Fishs.Count; i++)
            {
                if (Fishs[i].Fish == other.gameObject)
                {
                    Debug.Log("FishCatch=" + Fishs[i].statePath);
                    CurrentFish = Fishs[i];
                    // Fishs[i].SetColorCatch();
                    Fishs[i].GoToFishingPath();

                    settingCatch     = false;
                    render.enabled   = false;
                    collider.enabled = false;
                    Fishrod.SetActive(false);
                }
                else
                {
                    // Fishs[i].SetColorNoCatch();
                    Fishs[i].BackMainPath();
                }
            }
        }
    }
Ejemplo n.º 2
0
 public void SetFish(FishPathController fishController)
 {
     Fishs.Add(fishController);
     fishController.Feed = Feed;
 }