コード例 #1
0
    // -----------------------------------------------------------------------------------
    // ApplyBlueprints
    // @Editor
    // -----------------------------------------------------------------------------------
    public void ApplyBlueprints()
    {
#if UNITY_EDITOR
        int baseValue     = 0;
        int bonusPerLevel = 0;

        // -------- Health
        foreach (UCE_TemplateEntityBlueprint blueprint in blueprints)
        {
            if (!blueprint)
            {
                continue;
            }

            baseValue     += blueprint.healthMax.baseValue;
            bonusPerLevel += blueprint.healthMax.bonusPerLevel;
        }

        if (baseValue != 0)
        {
            _healthMax = new LinearInt {
                baseValue = baseValue, bonusPerLevel = bonusPerLevel
            }
        }
        ;

        // --------


        // --------


        // --------
#endif
    }

    // -----------------------------------------------------------------------------------
}