Initialize local project and fix ranch growth synchronization
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
package net.pixvi.myr.net
|
||||
{
|
||||
import net.pixvi.myr.GameMath;
|
||||
import net.pixvi.myr.center.Master;
|
||||
import net.pixvi.pfw.utils.core.Singleton;
|
||||
|
||||
public class NetPayPoint
|
||||
{
|
||||
|
||||
public const PAYPOINT_REWARD:String = "rechargeService/getPayGift";
|
||||
|
||||
public const TIME_CHARGE_REWARD:String = "pay-server/timeRecharge/getChargeReward";
|
||||
|
||||
public const TIME_CHARGE_INFO:String = "pay-server/timeRecharge/getChargeRewardList";
|
||||
|
||||
private var onPayPointRewardComplete:Function;
|
||||
|
||||
private var onTimeChargeInfoComplete:Function;
|
||||
|
||||
private var onTimeChargeRewardComplete:Function;
|
||||
|
||||
public function NetPayPoint()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function getIns() : NetPayPoint
|
||||
{
|
||||
return Singleton.getInstanceOrCreate(NetPayPoint) as NetPayPoint;
|
||||
}
|
||||
|
||||
public function payPointReward(giftTypeId:String, onComplete:Function) : void
|
||||
{
|
||||
onPayPointRewardComplete = onComplete;
|
||||
var para:Object = {"giftTypeId":giftTypeId};
|
||||
NetCenter.getIns().send("rechargeService/getPayGift",para,payPointRewardHandler,true);
|
||||
}
|
||||
|
||||
private function payPointRewardHandler(re:Object) : void
|
||||
{
|
||||
if(onPayPointRewardComplete != null)
|
||||
{
|
||||
onPayPointRewardComplete(re.reward);
|
||||
onPayPointRewardComplete = null;
|
||||
}
|
||||
}
|
||||
|
||||
public function timeChargeInfo(startTime:Number, endTime:Number, onComplete:Function) : void
|
||||
{
|
||||
onTimeChargeInfoComplete = onComplete;
|
||||
var para:Object = {
|
||||
"masterId":Master.id,
|
||||
"startTime":startTime,
|
||||
"endTime":endTime
|
||||
};
|
||||
NetCenter.getIns().send("pay-server/timeRecharge/getChargeRewardList",para,timeChargeInfoHandler,true,GameMath.ModePayCrypto,NetCenter.SERVER_MODE_PAY,true);
|
||||
}
|
||||
|
||||
private function timeChargeInfoHandler(re:Object) : void
|
||||
{
|
||||
if(onTimeChargeInfoComplete != null)
|
||||
{
|
||||
onTimeChargeInfoComplete(re);
|
||||
onTimeChargeInfoComplete = null;
|
||||
}
|
||||
}
|
||||
|
||||
public function timeChargeReward(chargeRewardId:String, onComplete:Function) : void
|
||||
{
|
||||
onTimeChargeRewardComplete = onComplete;
|
||||
var para:Object = {
|
||||
"masterId":Master.id,
|
||||
"chargeRewardId":chargeRewardId
|
||||
};
|
||||
NetCenter.getIns().send("pay-server/timeRecharge/getChargeReward",para,timeChargeRewardHandler,true,GameMath.ModePayCrypto,NetCenter.SERVER_MODE_PAY,true);
|
||||
}
|
||||
|
||||
private function timeChargeRewardHandler(re:Object) : void
|
||||
{
|
||||
if(onTimeChargeRewardComplete != null)
|
||||
{
|
||||
onTimeChargeRewardComplete(re.reward);
|
||||
onTimeChargeRewardComplete = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user