コード例 #1
0
ファイル: Specialist.cs プロジェクト: jousle/Remake-Core
 /// <summary>
 /// Removes a specialist effect from the specailist
 /// </summary>
 /// <param name="effect">The specialist effect to remove.</param>
 public void RemoveSpecialistEffect(ISpecialistEffect effect)
 {
     if (_specialistEffects.Contains(effect))
     {
         _specialistEffects.Remove(effect);
     }
 }
コード例 #2
0
        public Specialist SpawnSpecialist(string specialistName, Player player)
        {
            if (_specialistPool.ContainsKey(specialistName))
            {
                SpecialistConfiguration configuration = _specialistPool[specialistName];
                Specialist spawnedSpecialist          = new Specialist(specialistName, (int)configuration.Priority, player);

                // Create the specialist effects.
                SpecialistEffectFactory effectFactory = new SpecialistEffectFactory();
                foreach (var effectConfiguration in configuration.SpecialistEffects.ToList())
                {
                    ISpecialistEffect effect = effectFactory.CreateSpecialistEffect(effectConfiguration);
                    spawnedSpecialist.AddSpecialistEffect(effect);
                }

                return(spawnedSpecialist);
            }
            return(null);
        }
コード例 #3
0
ファイル: Specialist.cs プロジェクト: jousle/Remake-Core
 /// <summary>
 /// Adds a specialist effect to the specialist
 /// </summary>
 /// <param name="effect">The effect to add.</param>
 public void AddSpecialistEffect(ISpecialistEffect effect)
 {
     _specialistEffects.Add(effect);
 }
コード例 #4
0
ファイル: Specialist.cs プロジェクト: jousle/Remake-Core
 /// <summary>
 /// Gets a textual description of a specialist effect.
 /// </summary>
 /// <param name="effect">The specialist effect to textualize</param>
 /// <returns>Player friendly text that explains the result of this effect.</returns>
 public abstract string GetEffectAsText(ISpecialistEffect effect);
コード例 #5
0
ファイル: Queen.cs プロジェクト: naib864/Remake-Core
 /// <summary>
 /// Returns nothing.
 /// </summary>
 /// <param name="effect">The effect to get text of</param>
 /// <returns>Nothing</returns>
 public override string GetEffectAsText(ISpecialistEffect effect)
 {
     return(null);
 }