Beispiel #1
0
 public void Init(AnimalInfo info, FishingArea containingArea)
 {
     base.Init(info);
     ContainingArea   = containingArea;
     MouthPivotOffset = transform.Find("Mouth Pivot").localPosition;
     _aiBehaviour     = new FishAI(this);
     Behaviour        = DoWander;
 }
Beispiel #2
0
 public void Cast(FishingArea area, Vector3 pointToReach, Action onFail)
 {
     Point = pointToReach;
     StartCoroutine(MoveTo(pointToReach, transform.position, 2f));
     _wiggleTweenID   = null;
     transform.parent = null;
     _onFail          = onFail;
     _currentArea     = area;
 }
    private void OnEnable()
    {
        _fishingArea      = target as FishingArea;
        _areaType         = serializedObject.FindProperty("_areaType");
        _gizmosColor      = serializedObject.FindProperty("_gizmosColor");
        _fishingBehaviour = serializedObject.FindProperty("_fishingBehaviour");
        _capacity         = serializedObject.FindProperty("_capacity");

        if (!_fishingArea.MarkersParentExists())
        {
            _fishingArea.CreateMarkersParent();
        }
    }
        public IActionResult Index(int?id)
        {
            APIHandler   webHandler   = new APIHandler();
            FishingAreas fishingAreas = webHandler.GetFishingAreas();

            if (id != null)
            {
                FishingArea selectedFishingArea = fishingAreas.getFishingArea((int)id);
                fishingAreas.data = new List <FishingArea> {
                    selectedFishingArea
                };
                return(View(fishingAreas));
            }
            return(View(fishingAreas));
        }
        public IActionResult SearchbyCounty(string?county)
        {
            APIHandler   webHandler   = new APIHandler();
            FishingAreas fishingAreas = webHandler.GetFishingAreas();

            if (string != null)
            {
                FishingArea selectedFishingArea = fishingAreas.getFishingArea((string)county);
                fishingAreas.data = new List <FishingArea> {
                    selectedFishingArea
                };
                return(View(fishingAreas));
            }

            return(View(fishingAreas));
        }
Beispiel #6
0
        // objektien sidonta vastaaviin kenttiin
        private void cbEditItem_Click(object sender, EventArgs e)
        {
            int    selectedItemType = cboItemTypeSelector.SelectedIndex;
            object selectedItem     = dgvItems.SelectedRows[0].DataBoundItem;

            FormHelper.ClearFields(currentLayout);
            SetEditMode(!editMode);

            switch (selectedItemType)
            {
            case 0:
            case 1:
            case 2:
                Resource r = (Resource)selectedItem;
                tbResourceName.Text = r.Name;
                break;

            case 3:
                User u = (User)selectedItem;
                tbUserName.Text    = u.Name;
                tbUserAddress.Text = u.Address;
                tbUserCity.Text    = u.City;
                tbUserKey.Text     = u.Key;
                tbUserZip.Text     = u.Zip;
                cboUserResearchArea.SelectedValue = u.ResearchAreaId;
                break;

            case 4:
                WaterSystem ws = (WaterSystem)selectedItem;
                tbResourceName.Text = ws.Name;
                break;

            case 5:
                FishingArea fa = (FishingArea)selectedItem;
                tbFishingAreaName.Text = fa.Name;
                cboFishingAreaResearchArea.SelectedValue = fa.ResearchAreaId;
                break;

            case 6:
                ResearchArea ra = (ResearchArea)selectedItem;
                tbResearchAreaName.Text = ra.Name;
                cboResearchAreaWaterSystem.SelectedValue = ra.WaterSystemId;
                break;
            }
        }
Beispiel #7
0
        public void Init(Fish fish, FishingArea callerArea)
        {
            _staminaPerlinSeed = UnityEngine.Random.Range(0, 1000);
            _steerPerlinSeed   = UnityEngine.Random.Range(0, 1000);

            _fishTendencySide = UnityEngine.Random.Range(0.0f, 1.0f) >= 0.5f ?
                                -1 : 1;

            _callerArea = callerArea;

            _fish        = fish;
            _fishStamina = fish.Info.CatchingValues.Stamina;

            _reelCount     = -1; // -1 prevents initial reel from counting
            _reelsRequired = fish.Info.CatchingValues.Stamina;

            OnFishBiteAction = StartCatchingBehaviour;

            ReelPressedAction = ReelIn;

            callerArea.FishingControls.Rod.Reel.performed += UpdateReelStateCallback;
            OnInit();
        }
 public void addFishingArea(FishingArea fishingArea)
 {
 }