Exemplo n.º 1
0
        /// <summary>
        /// 模拟数据
        /// </summary>
        public static void SimulationData()
        {
            MapData data = MapData.Load();

            g_BattleMap = new GolfCourseMap(data);
            g_BattleMap.BuildMap();


            g_SelClub             = new ClubInfo();
            g_SelClub.ID          = 10001;
            g_SelClub.Type        = 5;
            g_SelClub.Strength    = 190;
            g_SelClub.Accuracy    = 10;
            g_SelClub.ForwardSpin = 0;
            g_SelClub.BackSpin    = 0;
            g_SelClub.Hook        = 5;

            g_SelBall    = new BallInfo();
            g_SelBall.ID = 10001;
            g_SelBall.StrengthPercent = 0;
            g_SelBall.windRevise      = 0;
            g_SelBall.LRSpin          = 0;

            //GolfMapFlyCollision collision = null;
            //Vector3 s = new Vector3(250.0f, 0.0f, 25.0f);
            //Vector3 e = new Vector3(250.0f, -0.01125f, 25.0f);
            //g_BattleMap.CheckCollisionPoint(s, e, ref collision);
        }
Exemplo n.º 2
0
 public ClubInfo(ClubInfo a)
 {
     this.ID          = a.ID;
     this.Type        = a.Type;
     this.Strength    = a.Strength;
     this.Accuracy    = a.Accuracy;
     this.ForwardSpin = a.ForwardSpin;
     this.BackSpin    = a.BackSpin;
     this.Hook        = a.Hook;
 }
Exemplo n.º 3
0
        public static void ClearDC()
        {
            //退到登陆界面时执行
            if (g_BattleMap != null)
            {
                g_BattleMap.Clear();
                g_BattleMap = null;
            }

            if (g_SelClub != null)
            {
                g_SelClub = null;
            }

            if (g_SelBall != null)
            {
                g_SelBall = null;
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// 设置球杆ID
 /// </summary>
 public static void SetClub(ClubInfo Club, bool isSelf)
 {
     GetBattleOperateInfo(isSelf).Club = Club;
 }