Пример #1
0
 /// <summary>
 /// Adds the specified MMF_Feedback to the player
 /// </summary>
 /// <param name="newFeedback"></param>
 public virtual void AddFeedback(MMF_Feedback newFeedback)
 {
     InitializeList();
     newFeedback.Owner    = this;
     newFeedback.UniqueID = Guid.NewGuid().GetHashCode();
     FeedbacksList.Add(newFeedback);
     newFeedback.CacheRequiresSetup();
     newFeedback.InitializeCustomAttributes();
 }
Пример #2
0
        /// <summary>
        /// Adds a feedback of the specified type to the player
        /// </summary>
        /// <param name="feedbackType"></param>
        /// <returns></returns>
        public new MMF_Feedback AddFeedback(System.Type feedbackType)
        {
            InitializeList();
            MMF_Feedback newFeedback = (MMF_Feedback)Activator.CreateInstance(feedbackType);

            newFeedback.Label    = FeedbackPathAttribute.GetFeedbackDefaultName(feedbackType);
            newFeedback.Owner    = this;
            newFeedback.UniqueID = Guid.NewGuid().GetHashCode();
            FeedbacksList.Add(newFeedback);
            newFeedback.InitializeCustomAttributes();
            newFeedback.CacheRequiresSetup();
            return(newFeedback);
        }