Пример #1
0
        public SceneHead(string roleKey, string pic, string storydialogs, string type, string description, int level, bool showTanhao = false)
        {
            InitializeComponent();
            this.level = level;
            if (showTanhao)
            {
                TanHaoStory.AutoReverse    = true;
                TanHaoStory.RepeatBehavior = RepeatBehavior.Forever;
                TanHaoStory.Begin();
            }
            else
            {
                tanHaoImage.Visibility = System.Windows.Visibility.Collapsed;
            }

            this.roleKey      = roleKey;
            this.storydialogs = storydialogs;
            this.type         = type;
            this.description  = description;

            if (RoleManager.GetRole(roleKey) != null)
            {
                if (roleKey == "主角")
                {
                    head.Source = RuntimeData.Instance.Team[0].Head;
                }
                else
                {
                    head.Source = RoleManager.GetRole(roleKey).Head;
                }
            }
            else
            {
                head.Source = ResourceManager.GetImage(pic);
            }
            head.Stretch            = Stretch.Uniform;
            this.MouseLeftButtonUp += RoleButton_Click;
        }
Пример #2
0
 private void TanHaoImage_Loaded(object sender, System.Windows.RoutedEventArgs e)
 {
     TanHaoStory.AutoReverse    = true;
     TanHaoStory.RepeatBehavior = RepeatBehavior.Forever;
     TanHaoStory.Begin();
 }