Ejemplo n.º 1
0
 // Runs the Initializer() method in each static script. The call is ignored if
 // a class has already been initialized.
 public static void Run()
 {
     //AudioManager initialized by GameAudioSource object
     InvData.Initialize();
     BattleEnemyData.Initialize();
     HeroSpriteData.Initialize();
     BattleAbilityData.Initialize();
     BattleLoader.Initialize();
     Shop.Initialize();
     TalkData.Initialize();
 }
Ejemplo n.º 2
0
    /// <summary>
    /// Builds a hero, including any value used for battle calculations. Persists between battles.
    /// </summary>
    /// <param name="type">as HeroType</param>
    /// <param name="stats">as BattleStats</param>
    /// <param name="equipment">inventory of equipped equipment</param>
    /// <param name="name">fullname</param>
    public BattleHero(HeroType type, BattleStats stats, HeroEquipment equipment = null, string name = "Hero1")
    {
        heroType = type;
        sprites  = HeroSpriteData.MakeNewHeroSprites(heroType);

        fullName = name;

        // Load BStats
        BStats = stats;
        BStats.UpdateMax();
        HealAll();
        if (equipment != null)
        {
            Equipment = equipment;
        }
    }