예제 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (SwVersion != null ? SwVersion.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Api != null ? Api.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Date.GetHashCode();
         hashCode = (hashCode * 397) ^ (Language != null ? Language.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Currency != null ? Currency.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Units != null ? Units.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Dst != null ? Dst.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Tz != null ? Tz.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ LastEnergyErase.GetHashCode();
         hashCode = (hashCode * 397) ^ LastConfig.GetHashCode();
         return(hashCode);
     }
 }
예제 #2
0
        public void AddSpine(string atlasFile, string spineFile, SwVersion loaderVer, bool premultipledAlpha)
        {
            PlayerInfo playerInfo = new PlayerInfo()
            {
                AtlasFile          = atlasFile, SpineFile = spineFile,
                PremultipliedAlpha = premultipledAlpha,
            };
            PlayerProps playerStat = new PlayerProps()
            {
                IsLoop = true, UseAlpha = true
            };

            try
            {
                if (loaderVer.IsEqual(3, 5))
                {
                    _player = new Player_3_5(playerInfo, playerStat);
                }
                else if (loaderVer.IsEqual(3, 6))
                {
                    _player = new Player_3_6(playerInfo, playerStat);
                }
                else if (loaderVer.IsEqual(3, 7))
                {
                    _player = new Player_3_7(playerInfo, playerStat);
                }
                else if (loaderVer.IsEqual(3, 8))
                {
                    _player = new Player_3_8(playerInfo, playerStat);
                }

                _player.Initialize(GraphicsDevice);
                _player.ZoomAll(ViewSize.X, ViewSize.Y);

                Camera.CreateView(-ViewSize.X / 2, -ViewSize.Y);

                PlayerData.FromPlayer(_player);
            }
            catch (Exception ex)
            {
                System.Windows.MessageBox.Show(ex.Message, "Error Add Spine2D");
                _player = null;
            }
        }