Initialize local project and fix ranch growth synchronization
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package net.pixvi.myr.net
|
||||
{
|
||||
import net.pixvi.pfw.utils.core.Singleton;
|
||||
|
||||
public class NetSkin
|
||||
{
|
||||
|
||||
public static const SET_SKIN:String = "monsterService/monsterSetSkin";
|
||||
|
||||
private var onSetSkinComplete:Function;
|
||||
|
||||
public function NetSkin()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function getIns() : NetSkin
|
||||
{
|
||||
return Singleton.getInstanceOrCreate(NetSkin) as NetSkin;
|
||||
}
|
||||
|
||||
public function setSkin(monsterId:uint, skinTypeId:String, onComplete:Function) : void
|
||||
{
|
||||
onSetSkinComplete = onComplete;
|
||||
var para:Object = {
|
||||
"monsterId":monsterId,
|
||||
"skinType":skinTypeId
|
||||
};
|
||||
NetCenter.getIns().send("monsterService/monsterSetSkin",para,setSkinHandler);
|
||||
}
|
||||
|
||||
private function setSkinHandler(re:Object) : void
|
||||
{
|
||||
if(onSetSkinComplete != null)
|
||||
{
|
||||
onSetSkinComplete(re);
|
||||
onSetSkinComplete = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user