Exemple #1
0
        /// <summary>
        /// uidからpidを取得します
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        public static Success <SPidOnly> GetPid(string uid)
        {
            var arg = new SUidOnly()
            {
                uid = uid
            };

            return(ServerDataManager.Get <SPidOnly, SUidOnly>(arg, paths[KnownPaths.Account]));
        }
Exemple #2
0
        public static Success <SDecorationData[]> GetDecoration(string treeKey)
        {
            var arg = new STreeKeyOnly()
            {
                TreeKey = treeKey
            };

            return(ServerDataManager.Get <SDecorationData[], STreeKeyOnly>(arg, paths[KnownPaths.TreeDecoration]));
        }
Exemple #3
0
        /// <summary>
        /// 植木鉢にポイントを加算
        /// </summary>
        /// <param name="treeKey"></param>
        /// <returns></returns>
        public static bool GrowTree(string treeKey)
        {
            var arg = new STreeKeyOnly()
            {
                TreeKey = treeKey
            };

            return(ServerDataManager.Put(arg, paths[KnownPaths.Tree]));
        }
Exemple #4
0
        /// <summary>
        /// 植木鉢セッションを終了
        /// </summary>
        /// <param name="treeKey"></param>
        /// <returns></returns>
        public static bool StopTreePotSession(string treeKey)
        {
            var arg = new STreeKeyOnly()
            {
                TreeKey = treeKey
            };

            return(ServerDataManager.Delete(arg, paths[KnownPaths.TreePot]));
        }
Exemple #5
0
        /// <summary>
        /// 植木鉢セッションを開始
        /// </summary>
        /// <param name="locationX"></param>
        /// <param name="locationY"></param>
        /// <param name="treeKey"></param>
        /// <returns></returns>
        public static bool StartTreePotSession(double locationX, double locationY, string treeKey)
        {
            var arg = new STreePot()
            {
                locationX = locationX,
                locationY = locationY,
                TreeKey   = treeKey
            };

            return(ServerDataManager.Post(arg, paths[KnownPaths.TreePot]));
        }
Exemple #6
0
        /// <summary>
        /// ユーザー情報を更新します。
        /// </summary>
        /// <param name="locationX"></param>
        /// <param name="locationY"></param>
        /// <param name="pid"></param>
        /// <returns></returns>
        public static bool UpdateUser(double locationX, double locationY, string pid)
        {
            var arg = new SUpdateUser()
            {
                locationX = locationX,
                locationY = locationY,
                pid       = pid
            };

            return(ServerDataManager.Post(arg, paths[KnownPaths.Account]));
        }
Exemple #7
0
        public static Success <SFlyerData[]> GetFlyeies(double locationX, double locationY, double distance)
        {
            var arg = new SLocationAndDistance()
            {
                locationX = locationX,
                locationY = locationY,
                distance  = distance
            };

            return(ServerDataManager.Get <SFlyerData[], SLocationAndDistance>(arg, paths[KnownPaths.Flyer]));
        }
Exemple #8
0
        /// <summary>
        /// チラシ情報を更新する
        /// </summary>
        /// <param name="locationX"></param>
        /// <param name="locationY"></param>
        /// <param name="flayerKey"></param>
        /// <returns></returns>
        public static bool UpdateFlyer(double locationX, double locationY, string flayerKey)
        {
            var arg = new SUpdateFlyer()
            {
                locationX = locationX,
                locationY = locationY,
                FlyerKey  = flayerKey
            };

            return(ServerDataManager.Put <SUpdateFlyer>(arg, paths[KnownPaths.Flyer]));
        }
Exemple #9
0
        public static Success <SHotSpotData[]> GetHotSpots(double locationX, double locationY, double distance)
        {
            var arg = new SLocationAndDistance()
            {
                distance  = distance,
                locationX = locationX,
                locationY = locationY,
            };

            return(ServerDataManager.Get <SHotSpotData[], SLocationAndDistance>(arg, paths[KnownPaths.HotSpot]));
        }
Exemple #10
0
        /// <summary>
        /// 現在位置から、一定距離内のTreePotのリストを取得
        /// </summary>
        /// <param name="locationX"></param>
        /// <param name="locationY"></param>
        /// <param name="distance"></param>
        /// <returns></returns>
        public async static Task <Success <STreePot[]> > GetTreePots(double locationX, double locationY, double distance)
        {
            var arg = new SLocationAndDistance()
            {
                locationX = locationX,
                locationY = locationX,
                distance  = distance
            };

            return(ServerDataManager.Get <STreePot[], SLocationAndDistance>(arg, paths[KnownPaths.TreePot_View]));
        }
Exemple #11
0
        /// <summary>
        /// Tree(実態)の作成
        /// </summary>
        /// <param name="owner"></param>
        /// <param name="locationX"></param>
        /// <param name="locationY"></param>
        /// <param name="treeName"></param>
        /// <returns></returns>
        public static Success <STreeKeyOnly> MakeTree(string owner, double locationX, double locationY, string treeName)
        {
            var arg = new SMakeTree()
            {
                owner     = owner,
                locationX = locationX,
                locationY = locationY,
                TreeName  = treeName
            };

            return(ServerDataManager.Post <STreeKeyOnly, SMakeTree>(arg, paths[KnownPaths.Tree]));
        }
Exemple #12
0
        /// <summary>
        /// 自分の持つ植木鉢情報を取得
        /// </summary>
        /// <param name="owner"></param>
        /// <param name="locationX"></param>
        /// <param name="locationY"></param>
        /// <param name="distance"></param>
        /// <returns></returns>
        public static Success <SMyTreePot[]> GetMyTreePot(string owner, double locationX, double locationY, double distance)
        {
            var arg = new SGetMyTreePot()
            {
                owner     = owner,
                locationX = locationX,
                locationY = locationX,
                distance  = distance
            };

            return(ServerDataManager.Get <SMyTreePot[], SGetMyTreePot>(arg, paths[KnownPaths.TreePot]));
        }
Exemple #13
0
        /// <summary>
        /// チラシ情報をserverに送ります。
        /// </summary>
        /// <param name="date"></param>
        /// <param name="month"></param>
        /// <param name="year"></param>
        /// <param name="message"></param>
        /// <param name="time"></param>
        /// <param name="locationX"></param>
        /// <param name="locationY"></param>
        /// <returns></returns>
        public static Success <SFlyerKeyOnly> AddFlyer(int date, int month, int year, string message, string time, double locationX, double locationY)
        {
            var arg = new SAddFlyer()
            {
                date      = date,
                month     = month,
                year      = year,
                message   = message,
                time      = time,
                locationX = locationX,
                locationY = locationY,
            };

            return(ServerDataManager.Post <SFlyerKeyOnly, SAddFlyer>(arg, paths[KnownPaths.Flyer]));
        }
Exemple #14
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="kind"></param>
        /// <param name="message"></param>
        /// <param name="posX"></param>
        /// <param name="posY"></param>
        /// <param name="date"></param>
        /// <param name="month"></param>
        /// <param name="year"></param>
        /// <returns></returns>
        public static bool AddDecoration(int kind, string message, int posX, int posY, int date, int month, int year, string treeKey)
        {
            var arg = new SAddDecoration()
            {
                TreeKey = treeKey,
                kind    = kind,
                message = message,
                posX    = posX,
                posY    = posY,
                date    = date,
                month   = month,
                year    = year
            };

            return(ServerDataManager.Post(arg, paths[KnownPaths.TreeDecoration]));
        }
Exemple #15
0
        /// <summary>
        /// Partyを追加
        /// </summary>
        /// <param name="locationX"></param>
        /// <param name="locationY"></param>
        /// <param name="day"></param>
        /// <param name="month"></param>
        /// <param name="year"></param>
        /// <param name="kind"></param>
        /// <param name="message"></param>
        /// <param name="owner"></param>
        /// <returns></returns>
        public static bool AddParty(double locationX, double locationY, int day, int month, int year, int kind, string message, string owner)
        {
            var arg = new SPartyData()
            {
                locationX = locationX,
                locationY = locationY,
                dueday    = day,
                duemonth  = month,
                dueyear   = year,
                kind      = kind,
                message   = message,
                owner     = owner
            };

            return(ServerDataManager.Post(arg, paths[KnownPaths.Party]));
        }