Пример #1
0
    public bool IsValideMigrationTarget(Hex hex)
    {
        bool verdict = false;

        foreach(locomotionType loco in locomotion){
            if(hex.MeetsLocomotionRequirements(loco)){
                verdict = true;
                break;
            }
        }
        foreach(Adaptation.restriction item in restrictions){
            if(!hex.MeetsRestrictionRequirements(item)){
                verdict = false;
                break;
            }
        }

        return verdict;
    }
Пример #2
0
    private void PopulateLocoIcons(Hex hab)
    {
        bool[] locoChecks = new bool[4];

        locoChecks[0] = hab.MeetsLocomotionRequirements(Critter.locomotionType.AQUATIC);
        locoChecks[1] = hab.MeetsLocomotionRequirements(Critter.locomotionType.AMPHIBIOUS);
        locoChecks[2] = hab.MeetsLocomotionRequirements(Critter.locomotionType.TERRESTRIAL);
        locoChecks[3] = hab.MeetsLocomotionRequirements(Critter.locomotionType.AVIAN);

        SetLocoActive();

        for (int i = 0; i < locoChecks.Length; i++)
        {
            SetLocoLock(i, locoChecks[i]);
        }
    }