Esempio n. 1
0
 private static void Postfix(NavalController __instance, ShipModel __result)
 {
     if (__result.side == RuntimeVars.playerSide)
     {
         for (int i = 0; i < 6; i++)
         {
             var officer = __result.crew.GetCrewOfficer((ENavalTask)i);
             if (officer == null)
             {
                 return;
             }
             officer.attributes.perception   *= _settings.OfficerFirepowerModifier;
             officer.attributes.intelligence *= _settings.OfficerEfficiencyModifier;
             officer.attributes.strength     *= _settings.OfficerMeleeModifier;
             officer.attributes.dexterity    *= _settings.OfficerSailingModifier;
         }
     }
 }
Esempio n. 2
0
            private static void Postfix(NavalController __instance, ShipModel __result)
            {
                bool flag = __result.side == RuntimeVars.playerSide;

                if (flag)
                {
                    for (int i = 0; i < 6; i++)
                    {
                        NavalOfficer crewOfficer = __result.crew.GetCrewOfficer((ENavalTask)i);
                        bool         flag2       = crewOfficer == null;
                        if (flag2)
                        {
                            break;
                        }
                        NavalOfficer officer = crewOfficer;
                        officer.attributes.perception   = officer.attributes.perception * Main._settings.OfficerFirepowerModifier;
                        officer.attributes.intelligence = officer.attributes.intelligence * Main._settings.OfficerEfficiencyModifier;
                        officer.attributes.strength     = officer.attributes.strength * Main._settings.OfficerMeleeModifier;
                        officer.attributes.dexterity    = officer.attributes.dexterity * Main._settings.OfficerSailingModifier;
                    }
                }
            }
Esempio n. 3
0
    protected LayerMask clickMask = (1 << 8 | 1 << 9); // in this sample layer 8 = tiles collider and layer 10 = unit's collider

    #endregion
    // ------------------------------------------------------------------------------------------------------------
    #region start

    private void Awake()
    {
        Instance = this;
    }