Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
kebiao committed May 16, 2018
1 parent 78f0ea5 commit 084d5c4
Show file tree
Hide file tree
Showing 98 changed files with 17,734 additions and 0 deletions.
284 changes: 284 additions & 0 deletions Assets/Plugins/kbengine/kbengine_unity3d_plugins/AccountBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
/*
Generated by KBEngine!
Please do not modify this file!
Please inherit this module, such as: (class Account : AccountBase)
tools = kbcmd
*/

namespace KBEngine
{
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;

// defined in */scripts/entity_defs/Account.def
// Please inherit and implement "class Account : AccountBase"
public abstract class AccountBase : Entity
{
public EntityBaseEntityCall_AccountBase baseEntityCall = null;
public EntityCellEntityCall_AccountBase cellEntityCall = null;

public UInt64 lastSelCharacter = 0;
public virtual void onLastSelCharacterChanged(UInt64 oldValue) {}

public abstract void onCreateAvatarResult(Byte arg1, AVATAR_INFOS arg2);
public abstract void onRemoveAvatar(UInt64 arg1);
public abstract void onReqAvatarList(AVATAR_INFOS_LIST arg1);

public AccountBase()
{
}

public override void onGetBase()
{
baseEntityCall = new EntityBaseEntityCall_AccountBase(id, className);
}

public override void onGetCell()
{
cellEntityCall = new EntityCellEntityCall_AccountBase(id, className);
}

public override void onLoseCell()
{
cellEntityCall = null;
}

public override EntityCall getBaseEntityCall()
{
return baseEntityCall;
}

public override EntityCall getCellEntityCall()
{
return cellEntityCall;
}

public override void onRemoteMethodCall(MemoryStream stream)
{
ScriptModule sm = EntityDef.moduledefs["Account"];

UInt16 methodUtype = 0;
UInt16 componentPropertyUType = 0;

if(sm.useMethodDescrAlias)
{
componentPropertyUType = stream.readUint8();
methodUtype = stream.readUint8();
}
else
{
componentPropertyUType = stream.readUint16();
methodUtype = stream.readUint16();
}

Method method = null;

if(componentPropertyUType == 0)
{
method = sm.idmethods[methodUtype];
}
else
{
Property pComponentPropertyDescription = sm.idpropertys[componentPropertyUType];
switch(pComponentPropertyDescription.properUtype)
{
default:
break;
}

return;
}

switch(method.methodUtype)
{
case 10005:
Byte onCreateAvatarResult_arg1 = stream.readUint8();
AVATAR_INFOS onCreateAvatarResult_arg2 = ((DATATYPE_AVATAR_INFOS)method.args[1]).createFromStreamEx(stream);
onCreateAvatarResult(onCreateAvatarResult_arg1, onCreateAvatarResult_arg2);
break;
case 3:
UInt64 onRemoveAvatar_arg1 = stream.readUint64();
onRemoveAvatar(onRemoveAvatar_arg1);
break;
case 10003:
AVATAR_INFOS_LIST onReqAvatarList_arg1 = ((DATATYPE_AVATAR_INFOS_LIST)method.args[0]).createFromStreamEx(stream);
onReqAvatarList(onReqAvatarList_arg1);
break;
default:
break;
};
}

public override void onUpdatePropertys(MemoryStream stream)
{
ScriptModule sm = EntityDef.moduledefs["Account"];
Dictionary<UInt16, Property> pdatas = sm.idpropertys;

while(stream.length() > 0)
{
UInt16 _t_utype = 0;
UInt16 _t_child_utype = 0;

{
if(sm.usePropertyDescrAlias)
{
_t_utype = stream.readUint8();
_t_child_utype = stream.readUint8();
}
else
{
_t_utype = stream.readUint16();
_t_child_utype = stream.readUint16();
}
}

Property prop = null;

if(_t_utype == 0)
{
prop = pdatas[_t_child_utype];
}
else
{
Property pComponentPropertyDescription = pdatas[_t_utype];
switch(pComponentPropertyDescription.properUtype)
{
default:
break;
}

return;
}

switch(prop.properUtype)
{
case 40001:
Vector3 oldval_direction = direction;
direction = stream.readVector3();

if(prop.isBase())
{
if(inited)
onDirectionChanged(oldval_direction);
}
else
{
if(inWorld)
onDirectionChanged(oldval_direction);
}

break;
case 2:
UInt64 oldval_lastSelCharacter = lastSelCharacter;
lastSelCharacter = stream.readUint64();

if(prop.isBase())
{
if(inited)
onLastSelCharacterChanged(oldval_lastSelCharacter);
}
else
{
if(inWorld)
onLastSelCharacterChanged(oldval_lastSelCharacter);
}

break;
case 40000:
Vector3 oldval_position = position;
position = stream.readVector3();

if(prop.isBase())
{
if(inited)
onPositionChanged(oldval_position);
}
else
{
if(inWorld)
onPositionChanged(oldval_position);
}

break;
case 40002:
stream.readUint32();
break;
default:
break;
};
}
}

public override void callPropertysSetMethods()
{
ScriptModule sm = EntityDef.moduledefs["Account"];
Dictionary<UInt16, Property> pdatas = sm.idpropertys;

Vector3 oldval_direction = direction;
Property prop_direction = pdatas[2];
if(prop_direction.isBase())
{
if(inited && !inWorld)
onDirectionChanged(oldval_direction);
}
else
{
if(inWorld)
{
if(prop_direction.isOwnerOnly() && !isPlayer())
{
}
else
{
onDirectionChanged(oldval_direction);
}
}
}

UInt64 oldval_lastSelCharacter = lastSelCharacter;
Property prop_lastSelCharacter = pdatas[4];
if(prop_lastSelCharacter.isBase())
{
if(inited && !inWorld)
onLastSelCharacterChanged(oldval_lastSelCharacter);
}
else
{
if(inWorld)
{
if(prop_lastSelCharacter.isOwnerOnly() && !isPlayer())
{
}
else
{
onLastSelCharacterChanged(oldval_lastSelCharacter);
}
}
}

Vector3 oldval_position = position;
Property prop_position = pdatas[1];
if(prop_position.isBase())
{
if(inited && !inWorld)
onPositionChanged(oldval_position);
}
else
{
if(inWorld)
{
if(prop_position.isOwnerOnly() && !isPlayer())
{
}
else
{
onPositionChanged(oldval_position);
}
}
}

}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 084d5c4

Please sign in to comment.