删除不用的代码
This commit is contained in:
parent
a8502d7586
commit
020804e990
@ -273,21 +273,6 @@ namespace BF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeLineManager timeLineManager;
|
|
||||||
public TimeLineManager TimeLineManager
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (timeLineManager == null)
|
|
||||||
{
|
|
||||||
timeLineManager = TimeLineManager.Create();
|
|
||||||
timeLineManager.Init();
|
|
||||||
managerList.Add(timeLineManager);
|
|
||||||
}
|
|
||||||
return timeLineManager;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TaskManager taskMgr;
|
TaskManager taskMgr;
|
||||||
public TaskManager TaskMgr
|
public TaskManager TaskMgr
|
||||||
{
|
{
|
||||||
@ -334,22 +319,6 @@ namespace BF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BattleManager battleMgr;
|
|
||||||
public BattleManager BattleMgr
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (battleMgr == null)
|
|
||||||
{
|
|
||||||
battleMgr = BattleManager.Create();
|
|
||||||
battleMgr.SetMono(this);
|
|
||||||
battleMgr.Init();
|
|
||||||
managerList.Add(battleMgr);
|
|
||||||
}
|
|
||||||
return battleMgr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SetServerTime(long serverTime)
|
public static void SetServerTime(long serverTime)
|
||||||
{
|
{
|
||||||
ServerTime = serverTime;
|
ServerTime = serverTime;
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b39b5b3d98bd0da4392706cf96cedd54
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
// 由Lua层读配置更新
|
|
||||||
public static class BattleConfigure
|
|
||||||
{
|
|
||||||
// 战斗加速比例
|
|
||||||
public static float TimeScale = 1.0f;
|
|
||||||
// 普攻移动时间
|
|
||||||
public static float NormalMoveTime = 0.1f;
|
|
||||||
// 后撤移动时间
|
|
||||||
public static float NormalBackTime = 0.1f;
|
|
||||||
// 场景相机坐标x的范围
|
|
||||||
public static float CameraMinX = -16.0f;
|
|
||||||
public static float CameraMaxX = 16.0f;
|
|
||||||
// 场景范围
|
|
||||||
public static float SceneMinX = -24.0f;
|
|
||||||
public static float SceneMaxX = 24.0f;
|
|
||||||
public static float SceneMinZ = -10.0f;
|
|
||||||
public static float SceneMaxZ = 3.2f;
|
|
||||||
// 普攻位移距离
|
|
||||||
public static float DistanceAttack = 0.0f;
|
|
||||||
// 冲锋攻击的距离
|
|
||||||
public static float DistanceDash = 0.0f;
|
|
||||||
// 后撤的距离
|
|
||||||
public static float DistanceBack = 0.0f;
|
|
||||||
public static float BattleCenterPosX = 0.0f;
|
|
||||||
public static float WorldToScreenWidth = 0.0f;
|
|
||||||
public static float CheckMonsterTowardInterval = 0.1f;
|
|
||||||
public static float CheckAITargetPositionInterval = 0.1f;
|
|
||||||
public static float MonsterScaleFactorXZ = 3.0f;
|
|
||||||
public static float SceneMidX = 0.0f;
|
|
||||||
public static float SceneMidZ = -3.4f;
|
|
||||||
// 普攻往后飞的距离
|
|
||||||
public static float DistanceHitBack = 1.5f;
|
|
||||||
// 击飞往后飞的距离
|
|
||||||
public static float DistanceHitFly = 6.25f;
|
|
||||||
// 击飞的高度
|
|
||||||
public static float HeightHitFly = 8.0f;
|
|
||||||
// 击飞的从起飞到落地的时间
|
|
||||||
public static float TimeHitFly = 1.5f;
|
|
||||||
// 击飞后躺在地上的时间
|
|
||||||
public static float TimeLie = 1.5f;
|
|
||||||
// 击退的时间
|
|
||||||
public static float HitBackTime = 0.1f;
|
|
||||||
public static float HitBackSpeed = BattleConst.UNIT_MOVE_DISTANCE / HitBackTime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: d6c43abc555a31948b2c2c768c39c7e7
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,203 +0,0 @@
|
|||||||
|
|
||||||
using UnityEngine;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
// MonsterData的monsterType,0,1,2分别对应小怪,精英和boss,这里就加一个4:英雄
|
|
||||||
public static class BattleUnitType
|
|
||||||
{
|
|
||||||
// 小怪
|
|
||||||
public const int NORMAL = 0;
|
|
||||||
// 精英
|
|
||||||
public const int ELITE = 1;
|
|
||||||
// BOSS
|
|
||||||
public const int BOSS = 2;
|
|
||||||
// 英雄
|
|
||||||
public const int HERO = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class BattleConst
|
|
||||||
{
|
|
||||||
public const int SIDE_ATK = 1;
|
|
||||||
public const int SIDE_DEF = 2;
|
|
||||||
public const int DOTWEEN_ID_BATTLE = 2;
|
|
||||||
public const string BATTLE_POOL_NAME = "battle_pool";
|
|
||||||
public const string BATTLE_ROOT_NAME = "battle_root";
|
|
||||||
public const string BATTLE_BOX_COLLIDER_NAME = "box_collider";
|
|
||||||
public const string BATTLE_SPHERE_COLLIDER_NAME = "sphere_collider";
|
|
||||||
public const string BATTLE_SPHERE_BULLET_NAME = "sphere_bullet";
|
|
||||||
public const string BATTLE_BOX_BULLET_NAME = "box_bullet";
|
|
||||||
public const string BATTLE_AIM_NAME = "aim";
|
|
||||||
public static int LAYER_DEFAULT = LayerMask.NameToLayer("Default");
|
|
||||||
public static int LAYER_HERO = LayerMask.NameToLayer("Hero");
|
|
||||||
public static int LAYER_MONSTER = LayerMask.NameToLayer("Monster");
|
|
||||||
public static int LAYER_ATK_BULLET = LayerMask.NameToLayer("AtkBullet");
|
|
||||||
public static int LAYER_DEF_BULLET = LayerMask.NameToLayer("DefBullet");
|
|
||||||
public const int DEFAULT_FACTOR = 10000;
|
|
||||||
public const float DEFAULT_FACTOR_FLOAT = 10000.0f;
|
|
||||||
public const double DEFAULT_FACTOR_DOUBLE = 10000.0;
|
|
||||||
// 360°对应的弧度值
|
|
||||||
public const float CircleRadians = 360.0f*Mathf.Deg2Rad;
|
|
||||||
public const float NegativeCircleRadians = -360.0f*Mathf.Deg2Rad;
|
|
||||||
public static MaterialPropertyBlock UnitMaterialPropertyBlock = new MaterialPropertyBlock();
|
|
||||||
public static int UNIT_GLOW_COLOR_ID = Shader.PropertyToID("_glow_color");
|
|
||||||
public static int UNIT_GLOW_COLOR_ENABLE_ID = Shader.PropertyToID("_glow_color_enable");
|
|
||||||
public const float DelayRecycle = 0.35f;
|
|
||||||
public const float DeadMoveSpeed = 5.0f;
|
|
||||||
public const float DeadMoveDistance = 3.0f;
|
|
||||||
public const string SPRITE_CHARACTER_SHADER_NAME = "BF/Sprites/Character";
|
|
||||||
public const string MODEL_CHARACTER_SHADER_NAME = "BF/Models/Character";
|
|
||||||
public const float UNIT_MOVE_DISTANCE = 1000.0f;
|
|
||||||
public const float UNIT_MOVE_DISTANCE_OPPOSITE = -1000.0f;
|
|
||||||
public const float ITEM_QUICK_MOVE_SPEED = 10.0f;
|
|
||||||
public const float ITEM_QUICK_MOVE_TIME = 2.0f;
|
|
||||||
public const float EXP_ITEM_MOVE_SPEED = 10.0f;
|
|
||||||
public const float EXP_ITEM_MOVE_TIME = 0.2f;
|
|
||||||
public const float CHECK_DIRECTION_TIME = 0.1f;
|
|
||||||
public const float RADIANS_10 = 10.0f*Mathf.Deg2Rad;
|
|
||||||
public const float RADIANS_180 = 180.0f*Mathf.Deg2Rad;
|
|
||||||
public const float RADIANS_NEGATIVE_180 = -180.0f*Mathf.Deg2Rad;
|
|
||||||
public const float RADIANS_360 = 360.0f*Mathf.Deg2Rad;
|
|
||||||
public const int EFFECT_TYPE_MOVE_L = 1;
|
|
||||||
public const int EFFECT_TYPE_MOVE_R = 2;
|
|
||||||
public const int EFFECT_TYPE_MOVE_L_2 = 3;
|
|
||||||
public const int EFFECT_TYPE_MOVE_R_2 = 4;
|
|
||||||
public const int EFFECT_TYPE_CRIT = 5;
|
|
||||||
public const int EFFECT_TYPE_BUFF = 6;
|
|
||||||
public static Color COLOR_ICE = new Color(0.647f, 0.752f, 0.933f);
|
|
||||||
public static Color COLOR_STAGNATE = new Color(0.7f, 0.7f, 0.1f);
|
|
||||||
public static Color COLOR_FEAR = new Color(0.1359f, 0.4222f, 0.6132f, 0.0f);
|
|
||||||
// 无限地图类型
|
|
||||||
public static int MAP_TYPE_UNLIMITED = 1;
|
|
||||||
// 竖向无限地图类型
|
|
||||||
public static int MAP_TYPE_PORTRAIT = 2;
|
|
||||||
// 方块地图类型
|
|
||||||
public static int MAP_TYPE_SQUARE = 3;
|
|
||||||
// 竖向无限地图类型2,比1小一点
|
|
||||||
public static int MAP_TYPE_SMALL_PORTRAIT = 4;
|
|
||||||
// 方块地图类型2,比1要小一些
|
|
||||||
public static int MAP_TYPE_SMALL_SQUARE = 5;
|
|
||||||
public static int ANIMATION_NAME_HASH_RUN = UnityEngine.Animator.StringToHash("run");
|
|
||||||
public static int ANIMATION_NAME_HASH_CHARGE = UnityEngine.Animator.StringToHash("charge");
|
|
||||||
public static int ANIMATION_NAME_HASH_CHARGE_LOOP = UnityEngine.Animator.StringToHash("charge_loop");
|
|
||||||
public const string SFX_DJGX_01 = "assets/prefabs/effects/battle/sfx_djgx_01.prefab";
|
|
||||||
public const string SFX_BXGZ_01 = "assets/prefabs/effects/battle/sfx_bxgz_01.prefab";
|
|
||||||
// CS.UnityEngine.Animator.StringToHash("battle_number_move_l")结果是-526518883
|
|
||||||
public const int ANIMATOR_HASH_NAME_NUMBER_MOVE_L = -526518883;
|
|
||||||
// CS.UnityEngine.Animator.StringToHash("battle_number_move_r")结果是445827326
|
|
||||||
public const int ANIMATOR_HASH_NAME_NUMBER_MOVE_R = 445827326;
|
|
||||||
// CS.UnityEngine.Animator.StringToHash("battle_number_buff")结果是1364146828
|
|
||||||
public const int ANIMATOR_HASH_NAME_NUMBER_BUFF = 1364146828;
|
|
||||||
// CS.UnityEngine.Animator.StringToHash("battle_number_crit")结果是-1734531349
|
|
||||||
public const int ANIMATOR_HASH_NAME_NUMBER_CRIT = -1734531349;
|
|
||||||
// CS.UnityEngine.Animator.StringToHash("battle_number_move_2_l")结果是1474588660
|
|
||||||
public const int ANIMATOR_HASH_NAME_NUMBER_MOVE_L_2 = 1474588660;
|
|
||||||
// CS.UnityEngine.Animator.StringToHash("battle_number_move_2_r")结果是-1377086825
|
|
||||||
public const int ANIMATOR_HASH_NAME_NUMBER_MOVE_R_2 = -1377086825;
|
|
||||||
public const int ANIMATOR_HAS_NAME_SKILL_TOAST = -253867994;
|
|
||||||
public const RigidbodyConstraints RIGIDBODY_CONSTRAINTS = RigidbodyConstraints.FreezePositionY | RigidbodyConstraints.FreezeRotation;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class BattlePosition
|
|
||||||
{
|
|
||||||
// 预处理
|
|
||||||
// 9 2 3
|
|
||||||
// 8 1 4
|
|
||||||
// 7 6 5
|
|
||||||
public static int[] RectPositionX = new int[121] {
|
|
||||||
0, 0, 1, 1, 1, 0, -1, -1, -1,
|
|
||||||
-1, 0, 1, 2, 2, 2, 2, 2, 1, 0, -1, -2, -2, -2, -2, -2,
|
|
||||||
-2, -1, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -3, -3, -3, -3, -3, -3,
|
|
||||||
-3, -2, -1, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0, -1, -2, -3, -4, -4, -4, -4, -4, -4, -4, -4, -4,
|
|
||||||
-4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5
|
|
||||||
};
|
|
||||||
|
|
||||||
public static int[] RectPositionZ = new int[121] {
|
|
||||||
0, 1, 1, 0, -1, -1, -1, 0, 1,
|
|
||||||
2, 2, 2, 2, 1, 0, -1, -2, -2, -2, -2, -2, -1, 0, 1, 2,
|
|
||||||
3, 3, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -3, -3, -3, -3, -3, -3, -2, -1, 0, 1, 2, 3,
|
|
||||||
4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0, -1, -2, -3, -4, -4, -4, -4, -4, -4, -4, -4, -4, -3, -2, -1, 0, 1, 2, 3, 4,
|
|
||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class BattleTMPNumber
|
|
||||||
{
|
|
||||||
public const float PUT_BACK_TIME = 1.367f;
|
|
||||||
//dmg number
|
|
||||||
public static readonly Dictionary<int, char[]> dmgNumber2StrDic = new Dictionary<int, char[]>()
|
|
||||||
{
|
|
||||||
{0 , new char[]{'<','s','p','r','i','t','e','=','1','6','>'}},
|
|
||||||
{1 , new char[]{'<','s','p','r','i','t','e','=','1','7','>'}},
|
|
||||||
{2 , new char[]{'<','s','p','r', 'i','t','e','=','1','8','>'}},
|
|
||||||
{3 , new char[]{'<','s','p','r', 'i','t','e','=','1','9','>'}},
|
|
||||||
{4 , new char[]{'<','s','p','r', 'i','t','e','=','2','0','>'}},
|
|
||||||
{5 , new char[]{'<','s','p','r', 'i','t','e','=','2','1','>'}},
|
|
||||||
{6 , new char[]{'<','s','p', 'r', 'i','t','e','=','2','2','>'}},
|
|
||||||
{7 , new char[]{'<','s','p', 'r', 'i','t','e','=','2','3','>'}},
|
|
||||||
{8 , new char[]{'<','s','p', 'r', 'i','t','e','=','2','4','>'}},
|
|
||||||
{9 , new char[]{'<','s','p','r', 'i','t','e','=','2','5','>'}},
|
|
||||||
};
|
|
||||||
public static readonly char[] dmgAdd = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '2', '7', '>' };
|
|
||||||
public static readonly char[] dmgSub = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '1', '4', '>' };
|
|
||||||
// public static readonly char[] dmgK = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '2', '6', '>' };
|
|
||||||
// public static readonly char[] dmgM = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '1', '5', '>' };
|
|
||||||
|
|
||||||
//crit number
|
|
||||||
public static readonly Dictionary<int, char[]> critNumber2StrDic = new Dictionary<int, char[]>()
|
|
||||||
{
|
|
||||||
{0 , new char[]{'<','s','p', 'r', 'i','t','e','=','7','>'}},
|
|
||||||
{1 , new char[]{'<','s','p', 'r', 'i','t','e','=','2','>'}},
|
|
||||||
{2 , new char[]{'<','s','p', 'r', 'i','t','e','=','3','>'}},
|
|
||||||
{3 , new char[]{'<','s','p', 'r', 'i','t','e','=','8','>'}},
|
|
||||||
{4 , new char[]{'<','s','p', 'r', 'i','t','e','=','4','>'}},
|
|
||||||
{5 , new char[]{'<','s','p', 'r', 'i','t','e','=','9','>'}},
|
|
||||||
{6 , new char[]{'<','s','p', 'r', 'i','t','e','=','1','0','>'}},
|
|
||||||
{7 , new char[]{'<','s','p', 'r', 'i','t','e','=','5','>'}},
|
|
||||||
{8 , new char[]{'<','s','p', 'r', 'i','t','e','=','1','1','>'}},
|
|
||||||
{9 , new char[]{'<','s','p', 'r', 'i','t','e','=','1','2','>'}},
|
|
||||||
};
|
|
||||||
public static readonly char[] critFlag = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '1', '3', '>' };
|
|
||||||
public static readonly char[] critAdd = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '1', '>' };
|
|
||||||
public static readonly char[] critSub = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '0', '>' };
|
|
||||||
// public static readonly char[] critK = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '6', '>' };
|
|
||||||
// public static readonly char[] critM = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '2', '8', '>' };
|
|
||||||
|
|
||||||
//heal number
|
|
||||||
public static readonly Dictionary<int, char[]> healNumber2StrDic = new Dictionary<int, char[]>()
|
|
||||||
{
|
|
||||||
{0 , new char[]{'<','s','p', 'r', 'i','t','e','=','3','1','>'}},
|
|
||||||
{1 , new char[]{'<','s','p', 'r', 'i','t','e','=','3','2','>'}},
|
|
||||||
{2 , new char[]{'<','s','p', 'r', 'i','t','e','=','3','3','>'}},
|
|
||||||
{3 , new char[]{'<','s','p', 'r', 'i','t','e','=','3','4','>'}},
|
|
||||||
{4 , new char[]{'<','s','p', 'r', 'i','t','e','=','3','5','>'}},
|
|
||||||
{5 , new char[]{'<','s','p', 'r', 'i','t','e','=','3','6','>'}},
|
|
||||||
{6 , new char[]{'<','s','p', 'r', 'i','t','e','=','3','7','>'}},
|
|
||||||
{7 , new char[]{'<','s','p', 'r', 'i','t','e','=','3','8','>'}},
|
|
||||||
{8 , new char[]{'<','s','p', 'r', 'i','t','e','=','3','9','>'}},
|
|
||||||
{9 , new char[]{'<','s','p', 'r', 'i','t','e','=','4','0','>'}},
|
|
||||||
};
|
|
||||||
public static readonly char[] healAdd = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '4', '3', '>' };
|
|
||||||
public static readonly char[] healSub = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '4', '2', '>' };
|
|
||||||
// public static readonly char[] healK = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '4', '1', '>' };
|
|
||||||
// public static readonly char[] healM = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '4', '1', '>' };
|
|
||||||
|
|
||||||
//red number
|
|
||||||
public static readonly Dictionary<int, char[]> redNumber2StrDic = new Dictionary<int, char[]>()
|
|
||||||
{
|
|
||||||
{0 , new char[]{'<','s','p', 'r', 'i','t','e','=','5','6','>'}},
|
|
||||||
{1 , new char[]{'<','s','p', 'r', 'i','t','e','=','4','5','>'}},
|
|
||||||
{2 , new char[]{'<','s','p', 'r', 'i','t','e','=','4','6','>'}},
|
|
||||||
{3 , new char[]{'<','s','p', 'r', 'i','t','e','=','4','7','>'}},
|
|
||||||
{4 , new char[]{'<','s','p', 'r', 'i','t','e','=','4','8','>'}},
|
|
||||||
{5 , new char[]{'<','s','p', 'r', 'i','t','e','=','5','1','>'}},
|
|
||||||
{6 , new char[]{'<','s','p', 'r', 'i','t','e','=','5','2','>'}},
|
|
||||||
{7 , new char[]{'<','s','p', 'r', 'i','t','e','=','4','9','>'}},
|
|
||||||
{8 , new char[]{'<','s','p', 'r', 'i','t','e','=','5','3','>'}},
|
|
||||||
{9 , new char[]{'<','s','p', 'r', 'i','t','e','=','5','4','>'}},
|
|
||||||
};
|
|
||||||
public static readonly char[] redAdd = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '2', '9', '>' };
|
|
||||||
public static readonly char[] redSub = new char[] { '<', 's', 'p', 'r', 'i', 't', 'e', '=', '5', '5', '>' };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: fd30dfddee1ea7d4cb02a404da4cd797
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
|
|
||||||
using DG.Tweening;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public static class BattleHelper
|
|
||||||
{
|
|
||||||
public static bool pause = false;
|
|
||||||
public static void Init()
|
|
||||||
{
|
|
||||||
pause = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Pause()
|
|
||||||
{
|
|
||||||
pause = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Resume()
|
|
||||||
{
|
|
||||||
pause = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Sequence CreateSequence()
|
|
||||||
{
|
|
||||||
var seq = DG.Tweening.DOTween.Sequence();
|
|
||||||
seq.intId = BattleConst.DOTWEEN_ID_BATTLE;
|
|
||||||
if (pause)
|
|
||||||
{
|
|
||||||
seq.timeScale = 0;
|
|
||||||
}
|
|
||||||
return seq;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Clear()
|
|
||||||
{
|
|
||||||
pause = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f8e96bdc549a1b749b69c3c93f10a1af
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,479 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using DG.Tweening;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleManager : ManagerBase
|
|
||||||
{
|
|
||||||
public BattlePool PoolHelper { get; private set; }
|
|
||||||
private bool battleStart = false;
|
|
||||||
public bool UpdateEnabled { get; private set; }
|
|
||||||
public GameObject BattleRoot { get; private set; }
|
|
||||||
private Vector2 vector2A = Vector2.zero;
|
|
||||||
private Vector2 vector2B = Vector2.zero;
|
|
||||||
private BattleControlHero MainHero;
|
|
||||||
private Camera uiCamera;
|
|
||||||
private Camera battleCamera;
|
|
||||||
private GameObject numberRoot;
|
|
||||||
private RectTransform hpBarRootTransform;
|
|
||||||
private RectTransform skillToastRootTransform;
|
|
||||||
public List<BattleControlUnit> AtkUnitsList = new List<BattleControlUnit>();
|
|
||||||
public List<BattleControlUnit> DefUnitsList = new List<BattleControlUnit>();
|
|
||||||
public bool IsAutoUpdateNumberRootPosition = false;
|
|
||||||
private Action<int, int, float, float> luaOnPlayFxFunc;
|
|
||||||
private Action<int, int> luaOnWarningHeroNumChangedFunc;
|
|
||||||
private Action<int, int> luaOnWarningNumChangedFunc;
|
|
||||||
private HashSet<int> effectHeroWarningSet = new HashSet<int>(); // 包含了玩家的所有预警
|
|
||||||
private HashSet<int> effectWarningSet = new HashSet<int>(); // 场上显示的预警
|
|
||||||
private HashSet<BattleSkillToast> skillToastSet = new HashSet<BattleSkillToast>();
|
|
||||||
|
|
||||||
#region override
|
|
||||||
static BattleManager instance;
|
|
||||||
public static BattleManager Create()
|
|
||||||
{
|
|
||||||
BFLog.LogAssert(instance == null, "This method only allows BFMain to call once");
|
|
||||||
instance = new BattleManager();
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
BattleManager() { }
|
|
||||||
|
|
||||||
public override void Init()
|
|
||||||
{
|
|
||||||
base.Init();
|
|
||||||
|
|
||||||
PoolHelper = new BattlePool();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Destroy()
|
|
||||||
{
|
|
||||||
base.Destroy();
|
|
||||||
instance = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Update()
|
|
||||||
{
|
|
||||||
base.Update();
|
|
||||||
if(!UpdateEnabled)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetMono(MonoBehaviour mono)
|
|
||||||
{
|
|
||||||
base.SetMono(mono);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public void InitBattle(Transform sceneNode, Camera uiCamera, Camera battleCamera)
|
|
||||||
{
|
|
||||||
if (ReferenceEquals(BattleRoot, null))
|
|
||||||
{
|
|
||||||
BattleRoot = new GameObject(BattleConst.BATTLE_ROOT_NAME);
|
|
||||||
}
|
|
||||||
BattleRoot.transform.SetParent(sceneNode, false);
|
|
||||||
PoolHelper.SetSceneNode(BattleRoot.transform);
|
|
||||||
PoolHelper.Init();
|
|
||||||
this.uiCamera = uiCamera;
|
|
||||||
this.battleCamera = battleCamera;
|
|
||||||
BattleConfigure.BattleCenterPosX = 0.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetMainHero(BattleControlHero mainHero)
|
|
||||||
{
|
|
||||||
MainHero = mainHero;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StartFight()
|
|
||||||
{
|
|
||||||
battleStart = true;
|
|
||||||
UpdateEnabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void EndFight()
|
|
||||||
{
|
|
||||||
battleStart = false;
|
|
||||||
UpdateEnabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PauseFight()
|
|
||||||
{
|
|
||||||
UpdateEnabled = false;
|
|
||||||
PoolHelper.Pause();
|
|
||||||
BattleHelper.Pause();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ResumeFight()
|
|
||||||
{
|
|
||||||
UpdateEnabled = true;
|
|
||||||
PoolHelper.Resume();
|
|
||||||
BattleHelper.Resume();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetShadow(GameObject shadow)
|
|
||||||
{
|
|
||||||
PoolHelper.SetShadow(shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetHpBar(GameObject hpBarRoot, GameObject hpAtk, GameObject hpDef)
|
|
||||||
{
|
|
||||||
hpBarRootTransform = hpBarRoot.transform as RectTransform;
|
|
||||||
PoolHelper.SetHpBar(hpAtk, hpDef, hpBarRoot.transform);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetSkillToast(GameObject skillToastRoot, GameObject skillToast)
|
|
||||||
{
|
|
||||||
skillToastRootTransform = skillToastRoot.transform as RectTransform;
|
|
||||||
PoolHelper.SetSkillToast(skillToast, skillToastRoot.transform);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowNormalSkillToast(string iconName, string str, float x, float y, float z, float addY)
|
|
||||||
{
|
|
||||||
var skillToast = PoolHelper.GetSkillToast();
|
|
||||||
skillToast.transform.SetAsLastSibling();
|
|
||||||
skillToast.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
|
|
||||||
skillToast.ShowNormalSkillToast(iconName, str);
|
|
||||||
var screenPosition = battleCamera.WorldToScreenPoint(new Vector3(x, y, z));
|
|
||||||
Vector2 lp;
|
|
||||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(this.skillToastRootTransform.transform as RectTransform, new Vector2(screenPosition.x, screenPosition.y), uiCamera, out lp);
|
|
||||||
var rectTransform = skillToast.transform as RectTransform;
|
|
||||||
rectTransform.anchoredPosition = new Vector2(lp.x, lp.y + addY);
|
|
||||||
|
|
||||||
skillToastSet.Add(skillToast);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowLegacySkillToast(string qltName, string iconName, string str, float x, float y, float z, float addY)
|
|
||||||
{
|
|
||||||
var skillToast = PoolHelper.GetSkillToast();
|
|
||||||
skillToast.transform.SetAsLastSibling();
|
|
||||||
skillToast.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
|
|
||||||
skillToast.ShowLegacySkillToast(qltName, iconName, str);
|
|
||||||
var screenPosition = battleCamera.WorldToScreenPoint(new Vector3(x, y, z));
|
|
||||||
Vector2 lp;
|
|
||||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(this.skillToastRootTransform.transform as RectTransform, new Vector2(screenPosition.x, screenPosition.y), uiCamera, out lp);
|
|
||||||
var rectTransform = skillToast.transform as RectTransform;
|
|
||||||
rectTransform.anchoredPosition = new Vector2(lp.x, lp.y + addY);
|
|
||||||
|
|
||||||
skillToastSet.Add(skillToast);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveSkillToastSet(BattleSkillToast skillToast)
|
|
||||||
{
|
|
||||||
skillToastSet.Remove(skillToast);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetEffectTextParent(GameObject numberRoot, GameObject effectText, GameObject effectTextRed, GameObject effectTextGreen, GameObject effectTextYellow)
|
|
||||||
{
|
|
||||||
this.numberRoot = numberRoot;
|
|
||||||
PoolHelper.SetEffectText(effectText, effectTextRed, effectTextGreen, effectTextYellow, numberRoot.transform);
|
|
||||||
IsAutoUpdateNumberRootPosition = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowEffectNumber(int colorType, int effectType, string effectNumber, float x, float y, float z, float addY)
|
|
||||||
{
|
|
||||||
var effectText = PoolHelper.GetEffectText(colorType);
|
|
||||||
effectText.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
|
|
||||||
effectText.ShowEffectNumber(effectType, effectNumber);
|
|
||||||
var screenPosition = battleCamera.WorldToScreenPoint(new Vector3(x, y, z));
|
|
||||||
Vector2 lp;
|
|
||||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(this.numberRoot.transform as RectTransform, new Vector2(screenPosition.x, screenPosition.y), uiCamera, out lp);
|
|
||||||
var rectTransform = effectText.transform as RectTransform;
|
|
||||||
rectTransform.anchoredPosition = new Vector2(lp.x, lp.y + addY);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateEffectTextRootNode()
|
|
||||||
{
|
|
||||||
if (IsAutoUpdateNumberRootPosition)
|
|
||||||
{
|
|
||||||
numberRoot.transform.localPosition = new Vector3(-BattleConfigure.BattleCenterPosX * BattleConfigure.WorldToScreenWidth, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateUIPosition(Vector3 worldPosition, float addY, RectTransform uiTransform)
|
|
||||||
{
|
|
||||||
var screenPosition = battleCamera.WorldToScreenPoint(worldPosition);
|
|
||||||
Vector2 lp;
|
|
||||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(hpBarRootTransform, new Vector2(screenPosition.x, screenPosition.y), uiCamera, out lp);
|
|
||||||
uiTransform.anchoredPosition = new Vector2(lp.x, lp.y + addY);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddLuaOnPlayFxFunc(Action<int, int, float, float> luaFunc)
|
|
||||||
{
|
|
||||||
luaOnPlayFxFunc = luaFunc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PlayFx(int fxId, int direction, float x, float z)
|
|
||||||
{
|
|
||||||
luaOnPlayFxFunc?.Invoke(fxId, direction, x, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddLuaOnWarningHeroNumChangedFunc(Action<int, int> luaFunc)
|
|
||||||
{
|
|
||||||
luaOnWarningHeroNumChangedFunc = luaFunc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WarningHeroNumChanged(int changedNum, int totalNum)
|
|
||||||
{
|
|
||||||
luaOnWarningHeroNumChangedFunc?.Invoke(changedNum, totalNum);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddEffectHeroWarning(int uniqueId)
|
|
||||||
{
|
|
||||||
var success = effectHeroWarningSet.Add(uniqueId);
|
|
||||||
if (success)
|
|
||||||
{
|
|
||||||
WarningHeroNumChanged(1, GetEffectHeroWarningCount());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveEffectHeroWarning(int uniqueId)
|
|
||||||
{
|
|
||||||
var success = effectHeroWarningSet.Remove(uniqueId);
|
|
||||||
if (success)
|
|
||||||
{
|
|
||||||
WarningHeroNumChanged(-1, GetEffectHeroWarningCount());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetEffectHeroWarningCount()
|
|
||||||
{
|
|
||||||
return effectHeroWarningSet.Count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddLuaOnWarningNumChangedFunc(Action<int, int> luaFunc)
|
|
||||||
{
|
|
||||||
luaOnWarningNumChangedFunc = luaFunc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WarningNumChanged(int changedNum, int totalNum)
|
|
||||||
{
|
|
||||||
luaOnWarningNumChangedFunc?.Invoke(changedNum, totalNum);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddEffectWarning(int uniqueId)
|
|
||||||
{
|
|
||||||
var success = effectWarningSet.Add(uniqueId);
|
|
||||||
if (success)
|
|
||||||
{
|
|
||||||
WarningNumChanged(1, GetEffectWarningCount());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveEffectWarning(int uniqueId)
|
|
||||||
{
|
|
||||||
var success = effectWarningSet.Remove(uniqueId);
|
|
||||||
if (success)
|
|
||||||
{
|
|
||||||
WarningNumChanged(-1, GetEffectWarningCount());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetEffectWarningCount()
|
|
||||||
{
|
|
||||||
return effectWarningSet.Count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddToAtkUnitsList(BattleControlUnit unit)
|
|
||||||
{
|
|
||||||
AtkUnitsList.Add(unit);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveFromAtkUnitsList(BattleControlUnit unit)
|
|
||||||
{
|
|
||||||
AtkUnitsList.Remove(unit);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void AddToDefUnitsList(BattleControlUnit unit)
|
|
||||||
{
|
|
||||||
DefUnitsList.Add(unit);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveFromDefUnitsList(BattleControlUnit unit)
|
|
||||||
{
|
|
||||||
DefUnitsList.Remove(unit);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<BattleControlUnit> GetUnitsList(int side)
|
|
||||||
{
|
|
||||||
if (side == BattleConst.SIDE_ATK)
|
|
||||||
{
|
|
||||||
return DefUnitsList;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return AtkUnitsList;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetDefUnitsCount()
|
|
||||||
{
|
|
||||||
return DefUnitsList.Count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlUnit GetNearestUnit(int side)
|
|
||||||
{
|
|
||||||
BattleControlUnit unit = null;
|
|
||||||
if (side == BattleConst.SIDE_ATK)
|
|
||||||
{
|
|
||||||
var countDef = DefUnitsList.Count;
|
|
||||||
if(countDef <= 0)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
var position = MainHero.transform.position;
|
|
||||||
vector2A.Set(position.x, position.z);
|
|
||||||
float minDis = float.MaxValue;
|
|
||||||
for(int j = 0; j < countDef; j++)
|
|
||||||
{
|
|
||||||
var objB = DefUnitsList[j];
|
|
||||||
if (!objB.IsCollisionEnabled)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
vector2B.Set(objB.transform.position.x, objB.transform.position.z);
|
|
||||||
var dis = (vector2B - vector2A).sqrMagnitude;
|
|
||||||
if (dis < minDis)
|
|
||||||
{
|
|
||||||
minDis = dis;
|
|
||||||
unit = objB;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return MainHero;
|
|
||||||
}
|
|
||||||
return unit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GetNearestDefUnit(float x, float z, out BattleControlUnit leftUnit, out BattleControlUnit rightUnit)
|
|
||||||
{
|
|
||||||
leftUnit = null;
|
|
||||||
rightUnit = null;
|
|
||||||
var count = DefUnitsList.Count;
|
|
||||||
if (count <= 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
float leftMinX = float.MaxValue;
|
|
||||||
float rightMinX = float.MaxValue;
|
|
||||||
float leftDisZ = 0.0f;
|
|
||||||
float rightDisZ = 0.0f;
|
|
||||||
for (int i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
var defUnit = DefUnitsList[i];
|
|
||||||
var defX = defUnit.transform.position.x;
|
|
||||||
if (defX >= x)
|
|
||||||
{
|
|
||||||
var diffX = defX - x;
|
|
||||||
if (Mathf.Abs(diffX - rightMinX) < 0.000001f)
|
|
||||||
{
|
|
||||||
var newDisZ = Mathf.Abs(defUnit.transform.position.z - z);
|
|
||||||
if (newDisZ < rightDisZ)
|
|
||||||
{
|
|
||||||
rightMinX = diffX;
|
|
||||||
rightDisZ = newDisZ;
|
|
||||||
rightUnit = defUnit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (diffX < rightMinX)
|
|
||||||
{
|
|
||||||
rightMinX = diffX;
|
|
||||||
rightDisZ = Mathf.Abs(defUnit.transform.position.z - z);
|
|
||||||
rightUnit = defUnit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var diffX = x - defX;
|
|
||||||
if (Mathf.Abs(diffX - leftMinX) < 0.000001f)
|
|
||||||
{
|
|
||||||
var newDisZ = Mathf.Abs(defUnit.transform.position.z - z);
|
|
||||||
if (newDisZ < leftDisZ)
|
|
||||||
{
|
|
||||||
leftMinX = diffX;
|
|
||||||
leftDisZ = newDisZ;
|
|
||||||
leftUnit = defUnit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (diffX < leftMinX)
|
|
||||||
{
|
|
||||||
leftMinX = diffX;
|
|
||||||
leftDisZ = Mathf.Abs(defUnit.transform.position.z - z);
|
|
||||||
leftUnit = defUnit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlUnit GetNearestDefUnitOnCurrDirection(float x, float z, int direction)
|
|
||||||
{
|
|
||||||
BattleControlUnit unit = null;
|
|
||||||
var countDef = DefUnitsList.Count;
|
|
||||||
if(countDef <= 0)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
vector2A.Set(x, z);
|
|
||||||
float minDis = float.MaxValue;
|
|
||||||
if (direction == 1) // 找右边的
|
|
||||||
{
|
|
||||||
for(int j = 0; j < countDef; j++)
|
|
||||||
{
|
|
||||||
var objB = DefUnitsList[j];
|
|
||||||
if (objB.transform.position.x >= x)
|
|
||||||
{
|
|
||||||
vector2B.Set(objB.transform.position.x, objB.transform.position.z);
|
|
||||||
var dis = (vector2B - vector2A).sqrMagnitude;
|
|
||||||
if (dis < minDis)
|
|
||||||
{
|
|
||||||
minDis = dis;
|
|
||||||
unit = objB;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // 找左边的
|
|
||||||
{
|
|
||||||
for(int j = 0; j < countDef; j++)
|
|
||||||
{
|
|
||||||
var objB = DefUnitsList[j];
|
|
||||||
if (objB.transform.position.x <= x)
|
|
||||||
{
|
|
||||||
vector2B.Set(objB.transform.position.x, objB.transform.position.z);
|
|
||||||
var dis = (vector2B - vector2A).sqrMagnitude;
|
|
||||||
if (dis < minDis)
|
|
||||||
{
|
|
||||||
minDis = dis;
|
|
||||||
unit = objB;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return unit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Clear()
|
|
||||||
{
|
|
||||||
battleStart = false;
|
|
||||||
UpdateEnabled = false;
|
|
||||||
AtkUnitsList.Clear();
|
|
||||||
DefUnitsList.Clear();
|
|
||||||
PoolHelper.Clear();
|
|
||||||
MainHero = null;
|
|
||||||
luaOnPlayFxFunc = null;
|
|
||||||
luaOnWarningHeroNumChangedFunc = null;
|
|
||||||
effectHeroWarningSet.Clear();
|
|
||||||
effectWarningSet.Clear();
|
|
||||||
skillToastSet.Clear();
|
|
||||||
if (!ReferenceEquals(BattleRoot, null))
|
|
||||||
{
|
|
||||||
GameObject.Destroy(BattleRoot);
|
|
||||||
BattleRoot = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 13af7ece17b38f3468a5b7af927be14a
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,81 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleMonsterData
|
|
||||||
{
|
|
||||||
public bool IsInit = false;
|
|
||||||
public string Res = string.Empty;
|
|
||||||
// 碰撞半径
|
|
||||||
public float CollisionRadius = 0.0f;
|
|
||||||
// 血量
|
|
||||||
public long Hp = 0;
|
|
||||||
// 攻击力
|
|
||||||
public long Atk = 0;
|
|
||||||
public float Spd = 0;
|
|
||||||
public float CD = 0;
|
|
||||||
// 击退抗性
|
|
||||||
public int HitBackResist = 0;
|
|
||||||
// 模型缩放比例
|
|
||||||
public float ModelScale = 1.0f;
|
|
||||||
// 怪物掉落的经验的id
|
|
||||||
public int ExpId = 0;
|
|
||||||
// 怪物掉落的经验的值
|
|
||||||
public int ExpValue = 0;
|
|
||||||
// 怪物掉落的经验的概率
|
|
||||||
public int ExpProbability = 0;
|
|
||||||
// 怪物类型0:普通,1:精英,2:BOSS
|
|
||||||
public int MonsterType = 0;
|
|
||||||
// 是否能被技能击退
|
|
||||||
public bool IsHitBack = true;
|
|
||||||
// 行为逻辑
|
|
||||||
public int ActionType = 0;
|
|
||||||
// 行为逻辑参数1
|
|
||||||
public int ActionValue1 = 0;
|
|
||||||
// 行为逻辑参数2
|
|
||||||
public int ActionValue2 = 0;
|
|
||||||
// 主动技能
|
|
||||||
public int ActiveSkillId = 0;
|
|
||||||
// 主动技能cd
|
|
||||||
public float ActiveSkillCD = 0.0f;
|
|
||||||
// 主动技能是否有开场cd
|
|
||||||
public float ActiveSkillCDStart = 0.0f;
|
|
||||||
// 特殊怪物标识
|
|
||||||
public int SpecialMonster = 0;
|
|
||||||
// 攻击公式
|
|
||||||
public int AttackFormula = 0;
|
|
||||||
// 受到攻击的公式
|
|
||||||
public int BeAttackedFormula = 0;
|
|
||||||
// 免疫减速
|
|
||||||
public bool IgnoreSlow = false;
|
|
||||||
// 免疫冰冻
|
|
||||||
public bool IgnoreIce = false;
|
|
||||||
// 免疫击飞
|
|
||||||
public bool IgnoreAirborne = false;
|
|
||||||
// 免疫吸附
|
|
||||||
public bool IgnoreAdsorb = false;
|
|
||||||
// 免疫停滞
|
|
||||||
public bool IgnoreStagnate = false;
|
|
||||||
// 免疫恐惧
|
|
||||||
public bool IgnoreFear = false;
|
|
||||||
// 免疫掉血
|
|
||||||
public bool IgnoreReduceHp = false;
|
|
||||||
// 死亡时释放的技能id
|
|
||||||
public int TriggerDeadSkillId = 0;
|
|
||||||
// 死亡时有一定概率掉落爱心,炸弹,吸铁石
|
|
||||||
public int DropItemProbability = 0;
|
|
||||||
// 死亡掉落列表
|
|
||||||
public List<int> DropList;
|
|
||||||
public List<int> TryGetEmptyDropList()
|
|
||||||
{
|
|
||||||
if (ReferenceEquals(DropList, null))
|
|
||||||
{
|
|
||||||
DropList = new List<int>();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DropList.Clear();
|
|
||||||
}
|
|
||||||
return DropList;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 8d611bf2197928c4eb06c1b638496727
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattlePetData
|
|
||||||
{
|
|
||||||
public bool IsInit = false;
|
|
||||||
public string Res = string.Empty;
|
|
||||||
public int Follow = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 0a9ebe41d982fa5478156b39e5f16606
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,668 +0,0 @@
|
|||||||
|
|
||||||
using System.Net.Security;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System;
|
|
||||||
using System.CodeDom;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattlePool
|
|
||||||
{
|
|
||||||
private bool isClear = false;
|
|
||||||
private List<BattleControlBoxCollider> boxColliderList;
|
|
||||||
private List<BattleControlSphereCollider> sphereColliderList;
|
|
||||||
private List<BattleControlBoxBullet> boxBulletList;
|
|
||||||
private List<BattleControlSphereBullet> sphereBulletList;
|
|
||||||
private List<BattleContinuousTarget> continuousTargeList;
|
|
||||||
private List<BattleControlColliderContainer> colliderContainerList;
|
|
||||||
private List<BattleEffectNumber> allEffectNumberList;
|
|
||||||
private List<BattleSkillToast> allSkillToastList;
|
|
||||||
private List<BattleEffectNumber> effectNumberList;
|
|
||||||
private List<BattleEffectNumber> effectNumberRedList;
|
|
||||||
private List<BattleEffectNumber> effectNumberGreenList;
|
|
||||||
private List<BattleEffectNumber> effectNumberYellowList;
|
|
||||||
private List<BattleHpBar> hpBarAtkList;
|
|
||||||
private List<BattleHpBar> hpBarDefList;
|
|
||||||
private List<BattleSkillToast> skillToastList;
|
|
||||||
private GameObject poolNode;
|
|
||||||
private Transform sceneNode;
|
|
||||||
private GameObject cacheEffectText;
|
|
||||||
private GameObject cacheEffectTextRed;
|
|
||||||
private GameObject cacheEffectTextGreen;
|
|
||||||
private GameObject cacheEffectTextYellow;
|
|
||||||
private GameObject cacheShadow;
|
|
||||||
private Transform numberRoot;
|
|
||||||
private GameObject cacheHpAtk;
|
|
||||||
private GameObject cacheHpDef;
|
|
||||||
private Transform hpRoot;
|
|
||||||
private GameObject cacheSkillToast;
|
|
||||||
private Transform skillToastRoot;
|
|
||||||
private static int colliderUniqueId;
|
|
||||||
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
isClear = false;
|
|
||||||
if (poolNode == null)
|
|
||||||
{
|
|
||||||
poolNode = new GameObject(BattleConst.BATTLE_POOL_NAME);
|
|
||||||
poolNode.SetActive(false);
|
|
||||||
GameObject.DontDestroyOnLoad(poolNode);
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(boxColliderList, null))
|
|
||||||
{
|
|
||||||
boxColliderList = new List<BattleControlBoxCollider>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(sphereColliderList, null))
|
|
||||||
{
|
|
||||||
sphereColliderList = new List<BattleControlSphereCollider>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(boxBulletList, null))
|
|
||||||
{
|
|
||||||
boxBulletList = new List<BattleControlBoxBullet>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(sphereBulletList, null))
|
|
||||||
{
|
|
||||||
sphereBulletList = new List<BattleControlSphereBullet>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(continuousTargeList, null))
|
|
||||||
{
|
|
||||||
continuousTargeList = new List<BattleContinuousTarget>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(colliderContainerList, null))
|
|
||||||
{
|
|
||||||
colliderContainerList = new List<BattleControlColliderContainer>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(effectNumberList, null))
|
|
||||||
{
|
|
||||||
effectNumberList = new List<BattleEffectNumber>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(effectNumberYellowList, null))
|
|
||||||
{
|
|
||||||
effectNumberYellowList = new List<BattleEffectNumber>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(effectNumberGreenList, null))
|
|
||||||
{
|
|
||||||
effectNumberGreenList = new List<BattleEffectNumber>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(effectNumberRedList, null))
|
|
||||||
{
|
|
||||||
effectNumberRedList = new List<BattleEffectNumber>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(allEffectNumberList, null))
|
|
||||||
{
|
|
||||||
allEffectNumberList = new List<BattleEffectNumber>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(allSkillToastList, null))
|
|
||||||
{
|
|
||||||
allSkillToastList = new List<BattleSkillToast>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(hpBarAtkList, null))
|
|
||||||
{
|
|
||||||
hpBarAtkList = new List<BattleHpBar>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(hpBarDefList, null))
|
|
||||||
{
|
|
||||||
hpBarDefList = new List<BattleHpBar>();
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(skillToastList, null))
|
|
||||||
{
|
|
||||||
skillToastList = new List<BattleSkillToast>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetSceneNode(Transform sceneNode)
|
|
||||||
{
|
|
||||||
this.sceneNode = sceneNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetShadow(GameObject shadow)
|
|
||||||
{
|
|
||||||
this.cacheShadow = shadow;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GameObject GetShadow()
|
|
||||||
{
|
|
||||||
return GameObject.Instantiate(this.cacheShadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetEffectText(GameObject effectText, GameObject effectTextRed, GameObject effectTextGreen, GameObject effectTextYellow, Transform numberRoot)
|
|
||||||
{
|
|
||||||
this.cacheEffectText = effectText;
|
|
||||||
this.cacheEffectTextRed = effectTextRed;
|
|
||||||
this.cacheEffectTextGreen = effectTextGreen;
|
|
||||||
this.cacheEffectTextYellow = effectTextYellow;
|
|
||||||
this.numberRoot = numberRoot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetHpBar(GameObject hpAtk, GameObject hpDef, Transform numberRoot)
|
|
||||||
{
|
|
||||||
this.cacheHpAtk = hpAtk;
|
|
||||||
this.cacheHpDef = hpDef;
|
|
||||||
this.hpRoot = numberRoot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetSkillToast(GameObject skillToast, Transform skillToastRoot)
|
|
||||||
{
|
|
||||||
this.cacheSkillToast = skillToast;
|
|
||||||
this.skillToastRoot = skillToastRoot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlBoxCollider GetSkillBoxCollider()
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (boxColliderList.Count > 0)
|
|
||||||
{
|
|
||||||
var box = boxColliderList[boxColliderList.Count - 1];
|
|
||||||
boxColliderList.RemoveAt(boxColliderList.Count - 1);
|
|
||||||
box.gameObject.SetActive(true);
|
|
||||||
box.IsRecycle = false;
|
|
||||||
return box;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var gameObject = new GameObject(BattleConst.BATTLE_BOX_COLLIDER_NAME);
|
|
||||||
gameObject.transform.SetParent(sceneNode);
|
|
||||||
var box = gameObject.AddComponent<BattleControlBoxCollider>();
|
|
||||||
box.IsRecycle = false;
|
|
||||||
box.SetColliderEnabled(false);
|
|
||||||
return box;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RecycleSkillBoxCollider(BattleControlBoxCollider box)
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
GameObject.Destroy(box.gameObject);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
box.uniqueId = GetColliderUniqueId();
|
|
||||||
box.IsRecycle = true;
|
|
||||||
boxColliderList.Add(box);
|
|
||||||
box.gameObject.SetActive(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlSphereCollider GetSkillSphereCollider()
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (sphereColliderList.Count > 0)
|
|
||||||
{
|
|
||||||
var sphere = sphereColliderList[sphereColliderList.Count - 1];
|
|
||||||
sphereColliderList.RemoveAt(sphereColliderList.Count - 1);
|
|
||||||
sphere.gameObject.SetActive(true);
|
|
||||||
sphere.IsRecycle = false;
|
|
||||||
return sphere;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var gameObject = new GameObject(BattleConst.BATTLE_SPHERE_COLLIDER_NAME);
|
|
||||||
gameObject.transform.SetParent(sceneNode);
|
|
||||||
var sphere = gameObject.AddComponent<BattleControlSphereCollider>();
|
|
||||||
sphere.IsRecycle = false;
|
|
||||||
sphere.SetColliderEnabled(false);
|
|
||||||
return sphere;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RecycleSkillSphereCollider(BattleControlSphereCollider sphere)
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
GameObject.Destroy(sphere.gameObject);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sphere.uniqueId = GetColliderUniqueId();
|
|
||||||
sphere.IsRecycle = true;
|
|
||||||
sphereColliderList.Add(sphere);
|
|
||||||
sphere.gameObject.SetActive(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleContinuousTarget GetContinuousTarge()
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (continuousTargeList.Count > 0)
|
|
||||||
{
|
|
||||||
var target = continuousTargeList[continuousTargeList.Count - 1];
|
|
||||||
continuousTargeList.RemoveAt(continuousTargeList.Count - 1);
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var target = new BattleContinuousTarget();
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RecycleContinuousTarge(BattleContinuousTarget target)
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
target.Unit = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
continuousTargeList.Add(target);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlColliderContainer GetColliderContainer()
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (colliderContainerList.Count > 0)
|
|
||||||
{
|
|
||||||
var container = colliderContainerList[colliderContainerList.Count - 1];
|
|
||||||
colliderContainerList.RemoveAt(colliderContainerList.Count - 1);
|
|
||||||
container.IsRecycle = false;
|
|
||||||
return container;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var container = new BattleControlColliderContainer();
|
|
||||||
container.IsRecycle = false;
|
|
||||||
return container;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RecycleColliderContainer(BattleControlColliderContainer container)
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
container.IsRecycle = true;
|
|
||||||
colliderContainerList.Add(container);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlSphereBullet GetSphereBullet()
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (sphereBulletList.Count > 0)
|
|
||||||
{
|
|
||||||
var bullet = sphereBulletList[sphereBulletList.Count - 1];
|
|
||||||
sphereBulletList.RemoveAt(sphereBulletList.Count - 1);
|
|
||||||
bullet.gameObject.SetActive(true);
|
|
||||||
bullet.IsRecycle = false;
|
|
||||||
return bullet;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var gameObject = new GameObject(BattleConst.BATTLE_SPHERE_BULLET_NAME);
|
|
||||||
gameObject.transform.SetParent(sceneNode);
|
|
||||||
var bullet = gameObject.AddComponent<BattleControlSphereBullet>();
|
|
||||||
bullet.IsRecycle = false;
|
|
||||||
bullet.SetColliderEnabled(false);
|
|
||||||
return bullet;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RecycleSphereBullet(BattleControlSphereBullet bullet)
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
GameObject.Destroy(bullet.gameObject);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
bullet.IsRecycle = true;
|
|
||||||
sphereBulletList.Add(bullet);
|
|
||||||
bullet.gameObject.SetActive(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlBoxBullet GetBoxBullet()
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (boxBulletList.Count > 0)
|
|
||||||
{
|
|
||||||
var bullet = boxBulletList[boxBulletList.Count - 1];
|
|
||||||
boxBulletList.RemoveAt(boxBulletList.Count - 1);
|
|
||||||
bullet.gameObject.SetActive(true);
|
|
||||||
bullet.IsRecycle = false;
|
|
||||||
return bullet;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var gameObject = new GameObject(BattleConst.BATTLE_BOX_BULLET_NAME);
|
|
||||||
gameObject.transform.SetParent(sceneNode);
|
|
||||||
var bullet = gameObject.AddComponent<BattleControlBoxBullet>();
|
|
||||||
bullet.IsRecycle = false;
|
|
||||||
bullet.SetColliderEnabled(false);
|
|
||||||
return bullet;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RecycleBoxBullet(BattleControlBoxBullet bullet)
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
GameObject.Destroy(bullet.gameObject);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
bullet.IsRecycle = true;
|
|
||||||
boxBulletList.Add(bullet);
|
|
||||||
bullet.gameObject.SetActive(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleEffectNumber GetEffectText(int colorType)
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (colorType == 1)
|
|
||||||
{
|
|
||||||
if (effectNumberRedList.Count > 0)
|
|
||||||
{
|
|
||||||
var cachedComp = effectNumberRedList[effectNumberRedList.Count - 1];
|
|
||||||
effectNumberRedList.RemoveAt(effectNumberRedList.Count - 1);
|
|
||||||
cachedComp.SetEnabled(true);
|
|
||||||
return cachedComp;
|
|
||||||
}
|
|
||||||
var obj = GameObject.Instantiate(cacheEffectTextRed, numberRoot, false);
|
|
||||||
var comp = obj.GetComponent<BattleEffectNumber>();
|
|
||||||
comp.ColorType = colorType;
|
|
||||||
allEffectNumberList.Add(comp);
|
|
||||||
return comp;
|
|
||||||
}
|
|
||||||
else if (colorType == 2)
|
|
||||||
{
|
|
||||||
if (effectNumberYellowList.Count > 0)
|
|
||||||
{
|
|
||||||
var cachedComp = effectNumberYellowList[effectNumberYellowList.Count - 1];
|
|
||||||
effectNumberYellowList.RemoveAt(effectNumberYellowList.Count - 1);
|
|
||||||
cachedComp.SetEnabled(true);
|
|
||||||
return cachedComp;
|
|
||||||
}
|
|
||||||
var obj = GameObject.Instantiate(cacheEffectTextYellow, numberRoot, false);
|
|
||||||
var comp = obj.GetComponent<BattleEffectNumber>();
|
|
||||||
comp.ColorType = colorType;
|
|
||||||
allEffectNumberList.Add(comp);
|
|
||||||
return comp;
|
|
||||||
}
|
|
||||||
else if (colorType == 3)
|
|
||||||
{
|
|
||||||
if (effectNumberGreenList.Count > 0)
|
|
||||||
{
|
|
||||||
var cachedComp = effectNumberGreenList[effectNumberGreenList.Count - 1];
|
|
||||||
effectNumberGreenList.RemoveAt(effectNumberGreenList.Count - 1);
|
|
||||||
cachedComp.SetEnabled(true);
|
|
||||||
return cachedComp;
|
|
||||||
}
|
|
||||||
var obj = GameObject.Instantiate(cacheEffectTextGreen, numberRoot, false);
|
|
||||||
var comp = obj.GetComponent<BattleEffectNumber>();
|
|
||||||
comp.ColorType = colorType;
|
|
||||||
allEffectNumberList.Add(comp);
|
|
||||||
return comp;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (effectNumberList.Count > 0)
|
|
||||||
{
|
|
||||||
var cachedComp = effectNumberList[effectNumberList.Count - 1];
|
|
||||||
effectNumberList.RemoveAt(effectNumberList.Count - 1);
|
|
||||||
cachedComp.SetEnabled(true);
|
|
||||||
return cachedComp;
|
|
||||||
}
|
|
||||||
var obj = GameObject.Instantiate(cacheEffectText, numberRoot, false);
|
|
||||||
var comp = obj.GetComponent<BattleEffectNumber>();
|
|
||||||
comp.ColorType = 0;
|
|
||||||
allEffectNumberList.Add(comp);
|
|
||||||
return comp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PutBackEffectText(BattleEffectNumber comp, int colorType)
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
GameObject.Destroy(comp.gameObject);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
comp.transform.localScale = Vector3.zero;
|
|
||||||
comp.SetEnabled(false);
|
|
||||||
if (colorType == 1)
|
|
||||||
{
|
|
||||||
effectNumberRedList.Add(comp);
|
|
||||||
}
|
|
||||||
else if (colorType == 2)
|
|
||||||
{
|
|
||||||
effectNumberYellowList.Add(comp);
|
|
||||||
}
|
|
||||||
else if (colorType == 3)
|
|
||||||
{
|
|
||||||
effectNumberGreenList.Add(comp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
effectNumberList.Add(comp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleHpBar GetHpBar(int side)
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (side == 2)
|
|
||||||
{
|
|
||||||
if (hpBarDefList.Count > 0)
|
|
||||||
{
|
|
||||||
var cachedComp = hpBarDefList[hpBarDefList.Count - 1];
|
|
||||||
hpBarDefList.RemoveAt(hpBarDefList.Count - 1);
|
|
||||||
cachedComp.enabled = true;
|
|
||||||
return cachedComp;
|
|
||||||
}
|
|
||||||
var obj = GameObject.Instantiate(cacheHpDef, hpRoot, false);
|
|
||||||
var comp = obj.GetComponent<BattleHpBar>();
|
|
||||||
return comp;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (hpBarAtkList.Count > 0)
|
|
||||||
{
|
|
||||||
var cachedComp = hpBarAtkList[hpBarAtkList.Count - 1];
|
|
||||||
hpBarAtkList.RemoveAt(hpBarAtkList.Count - 1);
|
|
||||||
cachedComp.enabled = true;
|
|
||||||
return cachedComp;
|
|
||||||
}
|
|
||||||
var obj = GameObject.Instantiate(cacheHpAtk, hpRoot, false);
|
|
||||||
var comp = obj.GetComponent<BattleHpBar>();
|
|
||||||
return comp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PutBackHpBar(BattleHpBar comp, int side)
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
GameObject.Destroy(comp.gameObject);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
comp.transform.localScale = Vector3.zero;
|
|
||||||
comp.enabled = false;
|
|
||||||
if (side == 2)
|
|
||||||
{
|
|
||||||
hpBarDefList.Add(comp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hpBarAtkList.Add(comp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleSkillToast GetSkillToast()
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (skillToastList.Count > 0)
|
|
||||||
{
|
|
||||||
var cachedComp = skillToastList[skillToastList.Count - 1];
|
|
||||||
skillToastList.RemoveAt(skillToastList.Count - 1);
|
|
||||||
cachedComp.enabled = true;
|
|
||||||
return cachedComp;
|
|
||||||
}
|
|
||||||
var obj = GameObject.Instantiate(cacheSkillToast, skillToastRoot, false);
|
|
||||||
var comp = obj.GetComponent<BattleSkillToast>();
|
|
||||||
allSkillToastList.Add(comp);
|
|
||||||
return comp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PutBackSkillToast(BattleSkillToast comp)
|
|
||||||
{
|
|
||||||
if(isClear)
|
|
||||||
{
|
|
||||||
GameObject.Destroy(comp.gameObject);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
comp.transform.localScale = Vector3.zero;
|
|
||||||
comp.SetEnabled(false);
|
|
||||||
skillToastList.Add(comp);
|
|
||||||
|
|
||||||
BFMain.Instance.BattleMgr.RemoveSkillToastSet(comp);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int GetColliderUniqueId()
|
|
||||||
{
|
|
||||||
return colliderUniqueId ++;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Pause()
|
|
||||||
{
|
|
||||||
if (!ReferenceEquals(allEffectNumberList, null))
|
|
||||||
{
|
|
||||||
int count = allEffectNumberList.Count;
|
|
||||||
for(int i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
allEffectNumberList[i].SetPause();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(allSkillToastList, null))
|
|
||||||
{
|
|
||||||
int count = allSkillToastList.Count;
|
|
||||||
for(int i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
allSkillToastList[i].SetPause();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Resume()
|
|
||||||
{
|
|
||||||
if (!ReferenceEquals(allEffectNumberList, null))
|
|
||||||
{
|
|
||||||
int count = allEffectNumberList.Count;
|
|
||||||
for(int i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
allEffectNumberList[i].SetResume();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(allSkillToastList, null))
|
|
||||||
{
|
|
||||||
int count = allSkillToastList.Count;
|
|
||||||
for(int i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
allSkillToastList[i].SetResume();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Clear()
|
|
||||||
{
|
|
||||||
isClear = true;
|
|
||||||
if (!ReferenceEquals(boxColliderList, null))
|
|
||||||
{
|
|
||||||
boxColliderList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(sphereColliderList, null))
|
|
||||||
{
|
|
||||||
sphereColliderList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(boxBulletList, null))
|
|
||||||
{
|
|
||||||
boxBulletList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(sphereBulletList, null))
|
|
||||||
{
|
|
||||||
sphereBulletList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(continuousTargeList, null))
|
|
||||||
{
|
|
||||||
continuousTargeList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(colliderContainerList, null))
|
|
||||||
{
|
|
||||||
colliderContainerList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(effectNumberList, null))
|
|
||||||
{
|
|
||||||
effectNumberList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(effectNumberGreenList, null))
|
|
||||||
{
|
|
||||||
effectNumberGreenList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(effectNumberRedList, null))
|
|
||||||
{
|
|
||||||
effectNumberRedList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(effectNumberYellowList, null))
|
|
||||||
{
|
|
||||||
effectNumberYellowList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(allEffectNumberList, null))
|
|
||||||
{
|
|
||||||
int count = allEffectNumberList.Count;
|
|
||||||
for(int i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
GameObject.Destroy(allEffectNumberList[i].gameObject);
|
|
||||||
}
|
|
||||||
allEffectNumberList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(allSkillToastList, null))
|
|
||||||
{
|
|
||||||
int count = allSkillToastList.Count;
|
|
||||||
for(int i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
GameObject.Destroy(allSkillToastList[i].gameObject);
|
|
||||||
}
|
|
||||||
allSkillToastList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(hpBarAtkList, null))
|
|
||||||
{
|
|
||||||
hpBarAtkList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(hpBarDefList, null))
|
|
||||||
{
|
|
||||||
hpBarDefList.Clear();
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(skillToastList, null))
|
|
||||||
{
|
|
||||||
skillToastList.Clear();
|
|
||||||
}
|
|
||||||
if (poolNode != null)
|
|
||||||
{
|
|
||||||
GameObject.Destroy(poolNode);
|
|
||||||
poolNode = null;
|
|
||||||
}
|
|
||||||
sceneNode = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: d7a4ede0d91b42f41b6d8f8cdad9764a
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,126 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleSkillData
|
|
||||||
{
|
|
||||||
public bool IsInit = false;
|
|
||||||
public int SkillId = 0;
|
|
||||||
// 子弹资源路径
|
|
||||||
public string Res = string.Empty;
|
|
||||||
public int DirectionType = 0;
|
|
||||||
// 子弹数量
|
|
||||||
public int BulletCount = 0;
|
|
||||||
// 是否享受英雄的子弹数量加成
|
|
||||||
public bool WithUnitBulletCount = false;
|
|
||||||
// 扩散角度
|
|
||||||
public int Diffusion = 0;
|
|
||||||
public int Kind = 0;
|
|
||||||
// 子弹飞行速度
|
|
||||||
public float BulletSpeed = 0.0f;
|
|
||||||
// 是否享受英雄的子弹飞行速度加成
|
|
||||||
public bool WithUnitBulletSpeed = false;
|
|
||||||
// 穿透数量
|
|
||||||
public int MaxHitCount = 0;
|
|
||||||
// 是否享受英雄的子弹穿透数量加成
|
|
||||||
public bool WithUnitBulletHitCount = false;
|
|
||||||
// 无限的穿透次数
|
|
||||||
public bool UnlimitedHitCount = false;
|
|
||||||
// 碰撞类型
|
|
||||||
public int CollisionType = 0;
|
|
||||||
// 基础碰撞半径
|
|
||||||
public float BaseCollisionRadius = 0.0f;
|
|
||||||
// 碰撞半径
|
|
||||||
public float CollisionRadius = 0.0f;
|
|
||||||
// 基础碰撞宽
|
|
||||||
public float BaseCollisionWidth = 0.0f;
|
|
||||||
// 碰撞宽
|
|
||||||
public float CollisionWidth = 0.0f;
|
|
||||||
// 基础碰撞宽
|
|
||||||
public float BaseCollisionHeight = 0.0f;
|
|
||||||
// 碰撞高
|
|
||||||
public float CollisionHeight = 0.0f;
|
|
||||||
// 持续时间
|
|
||||||
public float Lifetime = 0.0f;
|
|
||||||
// 是否永久存在
|
|
||||||
public bool Forever = false;
|
|
||||||
// 是否享受英雄的子弹持续时间加成
|
|
||||||
public bool WithUnitBulletLifetime = false;
|
|
||||||
// 圆型技能的攻击半径
|
|
||||||
public float Range = 0.0f;
|
|
||||||
// 攻击距离
|
|
||||||
public float AtkDistance = 0.0f;
|
|
||||||
// 是否享受英雄的攻击距离加成
|
|
||||||
public bool WithUnitBulletRange = false;
|
|
||||||
// 是否享受英雄减CD效果
|
|
||||||
public bool WithUnitSkillCD = false;
|
|
||||||
// 是否是地面技能
|
|
||||||
public bool IsFloor = false;
|
|
||||||
// 生效间隔
|
|
||||||
public float EffectInterval = 0.0f;
|
|
||||||
// 延迟生效
|
|
||||||
public float EffectDelay = 0.0f;
|
|
||||||
// 技能倍率
|
|
||||||
public double HurtFactor = 0.0f;
|
|
||||||
// 子弹发射间隔
|
|
||||||
public float BulletSendInterval = 0.0f;
|
|
||||||
// 子弹音效ID
|
|
||||||
public int BulletSoundID = 0;
|
|
||||||
// 子弹音效延迟播放时间
|
|
||||||
public float BulletSoundDelay = 0.0f;
|
|
||||||
// 子弹特效延迟播放
|
|
||||||
public float BulletFxDelay = 0.0f;
|
|
||||||
// 击退距离
|
|
||||||
public float HitBack = 0.0f;
|
|
||||||
// 生效次数
|
|
||||||
public int WorkTime = 0;
|
|
||||||
// 控制类型
|
|
||||||
public int ControlType = 0;
|
|
||||||
// 控制参数
|
|
||||||
public int ControlParam = 0;
|
|
||||||
// 控制持续时间
|
|
||||||
public float ControlDuration = 0.0f;
|
|
||||||
// 目标效果
|
|
||||||
public int TargetEffect = 0;
|
|
||||||
// 目标效果值
|
|
||||||
public long TargetEffectValue = 0;
|
|
||||||
// 目标效果时间
|
|
||||||
public float TargetEffectTime = 0.0f;
|
|
||||||
// 子技能id
|
|
||||||
public int SkillSub = 0;
|
|
||||||
// 子技能触发条件
|
|
||||||
public int SkillSubTrigger = 0;
|
|
||||||
// 子技能触发参数
|
|
||||||
public int SkillSubTriggerValue = 0;
|
|
||||||
// 子弹高度
|
|
||||||
public float BulletShootHeight = -1.0f;
|
|
||||||
// 额外伤害类型
|
|
||||||
public int HurtExtraType = 0;
|
|
||||||
// 额外伤害参数
|
|
||||||
public long HurtExtraValue = 0;
|
|
||||||
// 特殊伤害值
|
|
||||||
public long HurtSpecial = 0;
|
|
||||||
// 坐标偏移
|
|
||||||
public float OffsetX = 0.0f;
|
|
||||||
public float OffsetY = 0.0f;
|
|
||||||
public float OffsetZ = 0.0f;
|
|
||||||
// 特殊表现的特效
|
|
||||||
public string SpecialFx = string.Empty;
|
|
||||||
// 特殊表现的特效是否是地面特效
|
|
||||||
public bool IsSpecialFxFloor = false;
|
|
||||||
// 特殊表现的参数
|
|
||||||
public List<int> SpecialFxParams;
|
|
||||||
public List<int> TryGetEmptySpecialFxParams()
|
|
||||||
{
|
|
||||||
if (ReferenceEquals(SpecialFxParams, null))
|
|
||||||
{
|
|
||||||
SpecialFxParams = new List<int>();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SpecialFxParams.Clear();
|
|
||||||
}
|
|
||||||
return SpecialFxParams;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f1ddab01af970d448b974c3c147d413f
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleUnitData
|
|
||||||
{
|
|
||||||
// 血量
|
|
||||||
public long Hp = 0;
|
|
||||||
// 最大血量
|
|
||||||
public long MaxHp = 0;
|
|
||||||
// 生命恢复
|
|
||||||
public int Recover = 0;
|
|
||||||
// 攻击力
|
|
||||||
public long Atk = 0;
|
|
||||||
// 移动速度
|
|
||||||
public float MoveSpeed = 0;
|
|
||||||
// 暴击率
|
|
||||||
public int Crit = 0;
|
|
||||||
// 暴击伤害加成
|
|
||||||
public double CritDmgAddition = 0;
|
|
||||||
// 子弹数量
|
|
||||||
public int BulletCount = 0;
|
|
||||||
// 子弹额外穿透数量
|
|
||||||
public int HitCount = 0;
|
|
||||||
// 子弹飞行速度加成
|
|
||||||
public int BulletSpeed = 0;
|
|
||||||
// 技能持续时间加成
|
|
||||||
public float Lifetime = 0.0f;
|
|
||||||
// 冷却加成
|
|
||||||
public float Cooldown = 0.0f;
|
|
||||||
// 攻击范围加成
|
|
||||||
public float AtkRange = 0.0f;
|
|
||||||
// 道具拾取范围加成
|
|
||||||
public float PickupRange = 0.0f;
|
|
||||||
// 经验获取倍率增加
|
|
||||||
public float ExpAddition = 0.0f;
|
|
||||||
// 金币获取加成
|
|
||||||
public float CoinAddition = 0.0f;
|
|
||||||
// 受到普通怪伤害减少
|
|
||||||
public int DmgDec1 = 0;
|
|
||||||
// 受到精英怪伤害减少
|
|
||||||
public int DmgDec2 = 0;
|
|
||||||
// 受到BOSS伤减少
|
|
||||||
public int DmgDec3 = 0;
|
|
||||||
// 伤害减免,在伤害计算的最后按百分比减少
|
|
||||||
public double DmgDecAll = 0.0f;
|
|
||||||
// 治疗效果(捡爱心和技能回血,不包括自动回血)
|
|
||||||
public double Cured = 0.0f;
|
|
||||||
// 对boss和精英怪的伤害提升
|
|
||||||
public double HurtBossTime = 0.0f;
|
|
||||||
// 自身伤害加成
|
|
||||||
public double DmgAddition = 0.0f;
|
|
||||||
// 对精英和首领伤害提高(固定值)
|
|
||||||
public long HurtBoss = 0;
|
|
||||||
// 对小怪伤害提高(固定值)
|
|
||||||
public long HurtMonster = 0;
|
|
||||||
// 所有伤害提高(固定值)
|
|
||||||
public long HurtAll = 0;
|
|
||||||
// 子弹伤害减免(固定值)
|
|
||||||
public long BulletDecValue = 0;
|
|
||||||
// 碰撞伤害减免(固定值)
|
|
||||||
public long TouchDecValue = 0;
|
|
||||||
// 所有伤害减免(固定值)
|
|
||||||
public long AllDecValue = 0;
|
|
||||||
// 对目标异常状态下的伤害加成
|
|
||||||
public double DmgAdditionControl = 0.0;
|
|
||||||
// 爱心道具的恢复比例提升
|
|
||||||
public double HeartCure = 0.0;
|
|
||||||
// 特殊伤害值
|
|
||||||
public long AtkSpecial = 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 4f87530f348764a49aa6df5fefd6e8ce
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public enum BattleControlType {
|
|
||||||
Default = 0,
|
|
||||||
Hero,
|
|
||||||
Monster,
|
|
||||||
Bullet,
|
|
||||||
Item,
|
|
||||||
HalloweenSkillItem,
|
|
||||||
HalloweenEventItem
|
|
||||||
}
|
|
||||||
public class BattleControlBase : MonoBehaviour
|
|
||||||
{
|
|
||||||
[System.NonSerialized]
|
|
||||||
public bool IsCollisionEnabled = true;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public bool WaitRemove = false;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public int Side = 0;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public string Res = string.Empty;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public bool IsInCollision = false;
|
|
||||||
private Vector2 vector2A = Vector2.zero;
|
|
||||||
private Vector2 vector2B = Vector2.zero;
|
|
||||||
public virtual BattleControlType ControlType { get {return BattleControlType.Default;} }
|
|
||||||
public virtual void AddExp(int exp) { }
|
|
||||||
public virtual void AddHpPercent(double percent) { }
|
|
||||||
public virtual void AddGold(int count) { }
|
|
||||||
public virtual void OnHitBack(float distance, Vector3 atkerPos) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 8a383ef95b1042844b2d6de77db05cb7
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlBoxBullet : BattleControlBullet
|
|
||||||
{
|
|
||||||
private BoxCollider boxCollider;
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
boxCollider = gameObject.AddComponent<BoxCollider>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetupBoxCollisionBody(float collisionWidth, float collisionHeight)
|
|
||||||
{
|
|
||||||
boxCollider.center = new Vector3(collisionWidth/2.0f, 0.0f, 0.0f);
|
|
||||||
boxCollider.size = new Vector3(collisionWidth, 1.0f, collisionHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetColliderEnabled(bool enabled)
|
|
||||||
{
|
|
||||||
boxCollider.enabled = enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Recycle()
|
|
||||||
{
|
|
||||||
if (IsRecycle)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
boxCollider.enabled = false;
|
|
||||||
BFMain.Instance.BattleMgr.PoolHelper.RecycleBoxBullet(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 9dbfb1c0f5da60d43a230becd5e02348
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlBoxCollider : BattleControlCollider
|
|
||||||
{
|
|
||||||
private BoxCollider boxCollider;
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
boxCollider = gameObject.AddComponent<BoxCollider>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetupCollisionBody(float collisionWidth, float collisionHeight, float x, float z)
|
|
||||||
{
|
|
||||||
boxCollider.center = new Vector3(collisionWidth/2.0f, 0.0f, 0.0f);
|
|
||||||
boxCollider.size = new Vector3(collisionWidth, 1.0f, collisionHeight);
|
|
||||||
offset = new Vector3(x, 0.0f, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetColliderEnabled(bool enabled)
|
|
||||||
{
|
|
||||||
boxCollider.enabled = enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FixedUpdate()
|
|
||||||
{
|
|
||||||
if (!isActive)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
CheckCollider();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Recycle()
|
|
||||||
{
|
|
||||||
if (IsRecycle)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(container, null))
|
|
||||||
{
|
|
||||||
container.Remove(this);
|
|
||||||
}
|
|
||||||
boxCollider.enabled = false;
|
|
||||||
isActive = false;
|
|
||||||
BFMain.Instance.BattleMgr.PoolHelper.RecycleSkillBoxCollider(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 3d5e7fd63c962eb4abb773fe87d22418
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,399 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlBullet : MonoBehaviour
|
|
||||||
{
|
|
||||||
protected BattleControlUnit admin;
|
|
||||||
protected int bulletType = 0;
|
|
||||||
protected int bulletFinishType = 0;
|
|
||||||
protected int bulletOriginType = 0;
|
|
||||||
protected int searchType = 0;
|
|
||||||
protected float radius = 0.0f;
|
|
||||||
protected float duration = 0.0f;
|
|
||||||
protected float width = 0.0f;
|
|
||||||
protected float height = 0.0f;
|
|
||||||
protected float speed = 0.0f;
|
|
||||||
protected float offsetX = 0.0f;
|
|
||||||
protected float offsetZ = 0.0f;
|
|
||||||
protected float checkInterval = 0.0f;
|
|
||||||
protected float checkDuration = 0.0f;
|
|
||||||
protected int skillId = 0;
|
|
||||||
protected int cloneIndex = 0;
|
|
||||||
protected int skillEffectIndex = 0;
|
|
||||||
protected Vector3 offset = Vector3.zero;
|
|
||||||
protected Vector3 targetPosition = Vector3.zero;
|
|
||||||
protected BattleControlUnit targetUnit;
|
|
||||||
protected HashSet<int> CheckTargetDict = new HashSet<int>();
|
|
||||||
protected List<GameObject> CheckTargetList = new List<GameObject>();
|
|
||||||
protected List<BattleContinuousTarget> ContinuousTargetsList = new List<BattleContinuousTarget>();
|
|
||||||
[System.NonSerialized]
|
|
||||||
public float CacheX = 0.0f;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public float CacheY = 0.0f;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public float CacheZ = 0.0f;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public bool IsRecycle = false;
|
|
||||||
private bool endWithTime = false;
|
|
||||||
private bool endWithArrive = false;
|
|
||||||
private bool waitNextFixedFrame = false;
|
|
||||||
private bool nextFixedFrameTakeEffect = false;
|
|
||||||
private bool isOver = false;
|
|
||||||
private bool lockTarget = false;
|
|
||||||
private int fxId = 0;
|
|
||||||
private float fxDelayTime = 0.0f;
|
|
||||||
private bool checkFx = false;
|
|
||||||
public virtual void SetColliderEnabled(bool enabled) {}
|
|
||||||
public virtual void Recycle() {}
|
|
||||||
public virtual void SetupBoxCollisionBody(float collisionWidth, float collisionHeight) {}
|
|
||||||
public virtual void SetupSphereCollisionBody(float collisionRadius) {}
|
|
||||||
public void SetAdmin(BattleControlUnit unit)
|
|
||||||
{
|
|
||||||
admin = unit;
|
|
||||||
if (admin.Side == 1)
|
|
||||||
{
|
|
||||||
gameObject.layer = BattleConst.LAYER_ATK_BULLET;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gameObject.layer = BattleConst.LAYER_DEF_BULLET;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CachePosition()
|
|
||||||
{
|
|
||||||
var position = transform.position;
|
|
||||||
CacheX = position.x;
|
|
||||||
CacheY = position.y;
|
|
||||||
CacheZ = position.z;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CacheTargetPosition()
|
|
||||||
{
|
|
||||||
CacheX = targetPosition.x;
|
|
||||||
CacheZ = targetPosition.z;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitSphereBullet(int skillId, int cloneIndex, int skillEffectIndex, int bulletType, int bulletFinishType, int bulletOriginType, int searchType, float radius, float duration, float speed, float offsetX, float offsetZ)
|
|
||||||
{
|
|
||||||
this.skillId = skillId;
|
|
||||||
this.cloneIndex = cloneIndex;
|
|
||||||
this.skillEffectIndex = skillEffectIndex;
|
|
||||||
this.bulletType = bulletType;
|
|
||||||
this.bulletFinishType = bulletFinishType;
|
|
||||||
this.bulletOriginType = bulletOriginType;
|
|
||||||
this.searchType = searchType;
|
|
||||||
this.radius = radius;
|
|
||||||
this.duration = duration;
|
|
||||||
this.speed = speed;
|
|
||||||
this.offsetX = offsetX;
|
|
||||||
this.offsetZ = offsetZ;
|
|
||||||
offset = new Vector3(offsetX, 0.0f, offsetZ);
|
|
||||||
if (bulletFinishType == 1) // 飞到目标点才算完成,此时有速度和时间互斥
|
|
||||||
{
|
|
||||||
if (speed < 0.000001f)
|
|
||||||
{
|
|
||||||
endWithTime = true;
|
|
||||||
endWithArrive = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
endWithTime = false;
|
|
||||||
endWithArrive = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // 按时间算结束
|
|
||||||
{
|
|
||||||
endWithTime = true;
|
|
||||||
endWithArrive = false;
|
|
||||||
}
|
|
||||||
SetupSphereCollisionBody(radius);
|
|
||||||
InitBase();
|
|
||||||
StartSearch();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitBoxBullet(int skillId, int cloneIndex, int skillEffectIndex, int bulletType, int bulletFinishType, int bulletOriginType, int searchType, float w, float h, float duration, float speed, float offsetX, float offsetZ)
|
|
||||||
{
|
|
||||||
this.skillId = skillId;
|
|
||||||
this.skillEffectIndex = skillEffectIndex;
|
|
||||||
this.bulletType = bulletType;
|
|
||||||
this.bulletFinishType = bulletFinishType;
|
|
||||||
this.bulletOriginType = bulletOriginType;
|
|
||||||
this.searchType = searchType;
|
|
||||||
this.width = w;
|
|
||||||
this.height = h;
|
|
||||||
this.duration = duration;
|
|
||||||
this.speed = speed;
|
|
||||||
this.offsetX = offsetX;
|
|
||||||
this.offsetZ = offsetZ;
|
|
||||||
offset = new Vector3(offsetX, 0.0f, offsetZ);
|
|
||||||
if (bulletFinishType == 1) // 飞到目标点才算完成,此时有速度和时间互斥
|
|
||||||
{
|
|
||||||
if (speed < 0.000001f)
|
|
||||||
{
|
|
||||||
endWithTime = true;
|
|
||||||
endWithArrive = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
endWithTime = false;
|
|
||||||
endWithArrive = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // 按时间算结束
|
|
||||||
{
|
|
||||||
endWithTime = true;
|
|
||||||
endWithArrive = false;
|
|
||||||
}
|
|
||||||
SetupBoxCollisionBody(w, h);
|
|
||||||
InitBase();
|
|
||||||
StartSearch();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void InitBase()
|
|
||||||
{
|
|
||||||
CheckTargetDict.Clear();
|
|
||||||
CheckTargetList.Clear();
|
|
||||||
ContinuousTargetsList.Clear();
|
|
||||||
waitNextFixedFrame = false;
|
|
||||||
nextFixedFrameTakeEffect = false;
|
|
||||||
isOver = false;
|
|
||||||
targetUnit = null;
|
|
||||||
lockTarget = false;
|
|
||||||
checkFx = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void StartSearch()
|
|
||||||
{
|
|
||||||
if (bulletOriginType == 2)
|
|
||||||
{
|
|
||||||
transform.position = admin.transform.position;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!ReferenceEquals(admin.Target, null))
|
|
||||||
{
|
|
||||||
transform.position = admin.Target.transform.position;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
switch (searchType)
|
|
||||||
{
|
|
||||||
case 1: // 以目标为目标点
|
|
||||||
SearchWithTarget();
|
|
||||||
break;
|
|
||||||
case 2: // 以自身为目标点
|
|
||||||
SearchWitchSelf();
|
|
||||||
break;
|
|
||||||
case 3: // 以目标为目标
|
|
||||||
lockTarget = true;
|
|
||||||
targetUnit = admin.Target;
|
|
||||||
targetPosition = targetUnit.transform.position;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (endWithTime && speed < 0.000001f)
|
|
||||||
{
|
|
||||||
speed = (targetPosition - transform.position).magnitude / duration;
|
|
||||||
}
|
|
||||||
if (bulletType == 1) // 立即开始检测碰撞
|
|
||||||
{
|
|
||||||
SetColliderEnabled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SearchWithTarget()
|
|
||||||
{
|
|
||||||
if (admin.Direction == 1)
|
|
||||||
{
|
|
||||||
targetPosition = admin.Target.transform.position + new Vector3(offsetX, 0.0f, offsetZ);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
targetPosition = admin.Target.transform.position + new Vector3(-offsetX, 0.0f, offsetZ);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SearchWitchSelf()
|
|
||||||
{
|
|
||||||
if (admin.Direction == 1)
|
|
||||||
{
|
|
||||||
targetPosition = admin.transform.position + new Vector3(offsetX, 0.0f, offsetZ);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
targetPosition = admin.transform.position + new Vector3(-offsetX, 0.0f, offsetZ);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
|
||||||
{
|
|
||||||
var id = other.gameObject.GetInstanceID();
|
|
||||||
if (!CheckTargetDict.TryAdd(id))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
admin.OnHitTarget(other.gameObject, skillId, cloneIndex, skillEffectIndex);
|
|
||||||
CheckTargetList.Add(other.gameObject);
|
|
||||||
if (checkInterval > 0.000001f) // 持续型范围技能,进入范围的时候立即生效一次
|
|
||||||
{
|
|
||||||
var target = BF.BFMain.Instance.BattleMgr.PoolHelper.GetContinuousTarge();
|
|
||||||
target.Unit = other.gameObject;
|
|
||||||
target.Time = checkInterval;
|
|
||||||
ContinuousTargetsList.Add(target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnTriggerExit(Collider other)
|
|
||||||
{
|
|
||||||
var gameObject = other.gameObject;
|
|
||||||
var id = gameObject.GetInstanceID();
|
|
||||||
if (CheckTargetDict.Contains(id))
|
|
||||||
{
|
|
||||||
CheckTargetList.Remove(gameObject);
|
|
||||||
if (checkInterval > 0.000001f) // 持续型范围技能,进入范围的时候立即生效一次
|
|
||||||
{
|
|
||||||
var count = ContinuousTargetsList.Count;
|
|
||||||
for (int i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
if (gameObject == ContinuousTargetsList[i].Unit)
|
|
||||||
{
|
|
||||||
ContinuousTargetsList.RemoveAt(i);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetSearchTargetsCount()
|
|
||||||
{
|
|
||||||
return CheckTargetList.Count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetTargetId(int index)
|
|
||||||
{
|
|
||||||
if (index >= 0 && index < CheckTargetList.Count)
|
|
||||||
{
|
|
||||||
return CheckTargetList[index].GetInstanceID();
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Update()
|
|
||||||
{
|
|
||||||
if (checkFx)
|
|
||||||
{
|
|
||||||
fxDelayTime -= Time.deltaTime*BattleConfigure.TimeScale;
|
|
||||||
if (fxDelayTime < 0.0f)
|
|
||||||
{
|
|
||||||
checkFx = false;
|
|
||||||
BF.BFMain.Instance.BattleMgr.PlayFx(fxId, admin.Direction, transform.position.x, transform.position.z);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (endWithTime) // 按时间结束
|
|
||||||
{
|
|
||||||
duration -= Time.deltaTime*BattleConfigure.TimeScale;
|
|
||||||
if (duration < 0.0f)
|
|
||||||
{
|
|
||||||
if (bulletType == 1)
|
|
||||||
{
|
|
||||||
Recycle();
|
|
||||||
}
|
|
||||||
else if(bulletType == 2)
|
|
||||||
{
|
|
||||||
if (waitNextFixedFrame)
|
|
||||||
{
|
|
||||||
if (nextFixedFrameTakeEffect)
|
|
||||||
{
|
|
||||||
Recycle();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
waitNextFixedFrame = true;
|
|
||||||
SetColliderEnabled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // 按飞行速度到达目标点后结束
|
|
||||||
{
|
|
||||||
if (!isOver)
|
|
||||||
{
|
|
||||||
if ((transform.position - targetPosition).sqrMagnitude < 0.0001f)
|
|
||||||
{
|
|
||||||
isOver = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (bulletType == 1)
|
|
||||||
{
|
|
||||||
Recycle();
|
|
||||||
}
|
|
||||||
else if(bulletType == 2)
|
|
||||||
{
|
|
||||||
if (waitNextFixedFrame)
|
|
||||||
{
|
|
||||||
if (nextFixedFrameTakeEffect)
|
|
||||||
{
|
|
||||||
Recycle();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
waitNextFixedFrame = true;
|
|
||||||
SetColliderEnabled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FixedUpdate()
|
|
||||||
{
|
|
||||||
if (waitNextFixedFrame)
|
|
||||||
{
|
|
||||||
nextFixedFrameTakeEffect = true;
|
|
||||||
}
|
|
||||||
Vector3 moveToPosition;
|
|
||||||
if (lockTarget)
|
|
||||||
{
|
|
||||||
targetPosition = admin.Target.transform.position;
|
|
||||||
moveToPosition = Vector3.MoveTowards(transform.position, targetPosition, speed * Time.fixedDeltaTime * BattleConfigure.TimeScale);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
moveToPosition = Vector3.MoveTowards(transform.position, targetPosition, speed * Time.fixedDeltaTime * BattleConfigure.TimeScale);
|
|
||||||
}
|
|
||||||
if (moveToPosition.x < BattleConfigure.SceneMinX) // 撞左边墙了
|
|
||||||
{
|
|
||||||
moveToPosition.x = BattleConfigure.SceneMinX;
|
|
||||||
}
|
|
||||||
else if (moveToPosition.x > BattleConfigure.SceneMaxX) // 撞右边墙了
|
|
||||||
{
|
|
||||||
moveToPosition.x = BattleConfigure.SceneMaxX;
|
|
||||||
}
|
|
||||||
if (moveToPosition.z < BattleConfigure.SceneMinZ) // 撞下面墙了
|
|
||||||
{
|
|
||||||
moveToPosition.z = BattleConfigure.SceneMinZ;
|
|
||||||
}
|
|
||||||
else if (moveToPosition.z > BattleConfigure.SceneMaxZ) // 撞上面墙了
|
|
||||||
{
|
|
||||||
moveToPosition.z = BattleConfigure.SceneMaxZ;
|
|
||||||
}
|
|
||||||
transform.position = moveToPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PlayTargetPointFx(int id, float delay)
|
|
||||||
{
|
|
||||||
checkFx = true;
|
|
||||||
fxId = id;
|
|
||||||
fxDelayTime = delay;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 33df849147f3f1e40985f1151c997135
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,488 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleContinuousTarget
|
|
||||||
{
|
|
||||||
public GameObject Unit;
|
|
||||||
public float Time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class BattleControlCollider : MonoBehaviour
|
|
||||||
{
|
|
||||||
protected BattleControlUnit admin;
|
|
||||||
public int uniqueId = 0;
|
|
||||||
protected bool isActive = false;
|
|
||||||
protected int checkType = 0;
|
|
||||||
protected float checkInterval = 0.0f;
|
|
||||||
protected float checkDuration = 0.0f;
|
|
||||||
protected int skillId = 0;
|
|
||||||
protected int cloneIndex = 0;
|
|
||||||
protected int skillEffectIndex = 0;
|
|
||||||
protected bool unlimitCount = false;
|
|
||||||
protected float delayAimTime = 0.0f;
|
|
||||||
protected float aimFollowTime = 0.0f;
|
|
||||||
protected float aimFollowSpeed = 0.0f;
|
|
||||||
protected bool aimFollow = false;
|
|
||||||
protected bool delayAim = false;
|
|
||||||
protected bool effectOver = false;
|
|
||||||
protected bool waitRecycle = false;
|
|
||||||
protected Vector3 offset = Vector3.zero;
|
|
||||||
protected Vector3 targetPosition = Vector3.zero;
|
|
||||||
protected BattleControlUnit lockTarget;
|
|
||||||
protected bool isLockTarget = false;
|
|
||||||
protected HashSet<int> CheckTargetDict = new HashSet<int>();
|
|
||||||
protected List<GameObject> CheckTargetList = new List<GameObject>();
|
|
||||||
protected bool IsSearchByCollider = false;
|
|
||||||
protected List<BattleContinuousTarget> ContinuousTargetsList = new List<BattleContinuousTarget>();
|
|
||||||
protected BattleControlColliderContainer container;
|
|
||||||
private bool updatePositionWithLockTarget = false;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public float CacheX = 0.0f;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public float CacheY = 0.0f;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public float CacheZ = 0.0f;
|
|
||||||
[System.NonSerialized]
|
|
||||||
private static Vector2 Vector2A = Vector2.zero;
|
|
||||||
private static Vector2 Vector2B = Vector2.zero;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public bool IsRecycle = false;
|
|
||||||
public virtual void SetColliderEnabled(bool enabled) {}
|
|
||||||
public virtual void Recycle() {}
|
|
||||||
|
|
||||||
public void SetContainer(BattleControlColliderContainer container)
|
|
||||||
{
|
|
||||||
this.container = container;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveFromContainer()
|
|
||||||
{
|
|
||||||
this.container = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetIsSearchByCollider(bool isSearchByCollider)
|
|
||||||
{
|
|
||||||
IsSearchByCollider = isSearchByCollider;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetAdmin(BattleControlUnit unit)
|
|
||||||
{
|
|
||||||
admin = unit;
|
|
||||||
if (admin.Side == 1)
|
|
||||||
{
|
|
||||||
gameObject.layer = BattleConst.LAYER_ATK_BULLET;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gameObject.layer = BattleConst.LAYER_DEF_BULLET;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetUniqueId()
|
|
||||||
{
|
|
||||||
return uniqueId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetTargetPosition(Vector3 position)
|
|
||||||
{
|
|
||||||
targetPosition = position;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetLockTarget(BattleControlUnit unit)
|
|
||||||
{
|
|
||||||
lockTarget = unit;
|
|
||||||
isLockTarget = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetUpdatePositionWithLockTarget(bool updatePositionWithLockTarget)
|
|
||||||
{
|
|
||||||
this.updatePositionWithLockTarget = updatePositionWithLockTarget;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitPosition(float x, float y, float z)
|
|
||||||
{
|
|
||||||
if (admin.Direction == 1)
|
|
||||||
{
|
|
||||||
transform.position = new Vector3(x, y, z) + offset;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
transform.position = new Vector3(x, y, z) - offset;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 180.0f, 0.0f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MoveToLockTargetPosition(float deltaTime)
|
|
||||||
{
|
|
||||||
if (admin.Direction == 1)
|
|
||||||
{
|
|
||||||
var position = lockTarget.transform.position + offset;
|
|
||||||
var moveToPosition = Vector3.MoveTowards(transform.position, position, aimFollowSpeed * deltaTime);
|
|
||||||
transform.position = moveToPosition;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var position = lockTarget.transform.position - offset;
|
|
||||||
var moveToPosition = Vector3.MoveTowards(transform.position, position, aimFollowSpeed * deltaTime);
|
|
||||||
transform.position = moveToPosition;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 180.0f, 0.0f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MoveToTargetPosition(float deltaTime)
|
|
||||||
{
|
|
||||||
if (admin.Direction == 1)
|
|
||||||
{
|
|
||||||
var position = targetPosition + offset;
|
|
||||||
var moveToPosition = Vector3.MoveTowards(transform.position, position, aimFollowSpeed * deltaTime);
|
|
||||||
transform.position = moveToPosition;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var position = targetPosition - offset;
|
|
||||||
var moveToPosition = Vector3.MoveTowards(transform.position, position, aimFollowSpeed * deltaTime);
|
|
||||||
transform.position = moveToPosition;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 180.0f, 0.0f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdatePositionByTargetPosition()
|
|
||||||
{
|
|
||||||
if (admin.Direction == 1)
|
|
||||||
{
|
|
||||||
transform.position = targetPosition + offset;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
transform.position = targetPosition - offset;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 180.0f, 0.0f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdatePositionByLockTargetPosition()
|
|
||||||
{
|
|
||||||
if (admin.Direction == 1)
|
|
||||||
{
|
|
||||||
transform.position = lockTarget.transform.position + offset;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
transform.position = lockTarget.transform.position - offset;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 180.0f, 0.0f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdatePositionByAdminPosition()
|
|
||||||
{
|
|
||||||
if (admin.Direction == 1)
|
|
||||||
{
|
|
||||||
transform.position = admin.transform.position + offset;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
transform.position = admin.transform.position - offset;
|
|
||||||
transform.localEulerAngles = new Vector3(0.0f, 180.0f, 0.0f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CachePosition()
|
|
||||||
{
|
|
||||||
var position = transform.position;
|
|
||||||
CacheX = position.x;
|
|
||||||
CacheY = position.y;
|
|
||||||
CacheZ = position.z;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FollowTarget(float deltaTime)
|
|
||||||
{
|
|
||||||
if (isLockTarget)
|
|
||||||
{
|
|
||||||
MoveToLockTargetPosition(deltaTime);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MoveToTargetPosition(deltaTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitBase()
|
|
||||||
{
|
|
||||||
CheckTargetDict.Clear();
|
|
||||||
CheckTargetList.Clear();
|
|
||||||
ContinuousTargetsList.Clear();
|
|
||||||
effectOver = false;
|
|
||||||
waitRecycle = false;
|
|
||||||
lockTarget = null;
|
|
||||||
isLockTarget = false;
|
|
||||||
updatePositionWithLockTarget = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Search(int checkType, float interval, float duration, int skillId, int cloneIndex, int skillEffectIndex, bool unlimitCount, float delayAimTime, float aimFollowTime, float aimFollowSpeed, bool disposable)
|
|
||||||
{
|
|
||||||
this.checkType = checkType;
|
|
||||||
this.checkInterval = interval;
|
|
||||||
this.checkDuration = duration;
|
|
||||||
this.skillId = skillId;
|
|
||||||
this.cloneIndex = cloneIndex;
|
|
||||||
this.skillEffectIndex = skillEffectIndex;
|
|
||||||
this.unlimitCount = unlimitCount;
|
|
||||||
this.delayAimTime = delayAimTime;
|
|
||||||
this.aimFollowTime = aimFollowTime;
|
|
||||||
this.aimFollowSpeed = aimFollowSpeed;
|
|
||||||
if (aimFollowTime > 0.0f)
|
|
||||||
{
|
|
||||||
aimFollow = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aimFollow = false;
|
|
||||||
}
|
|
||||||
if (isLockTarget)
|
|
||||||
{
|
|
||||||
UpdatePositionByLockTargetPosition();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UpdatePositionByTargetPosition();
|
|
||||||
}
|
|
||||||
if (disposable)
|
|
||||||
{
|
|
||||||
delayAim = false;
|
|
||||||
StartSearch();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (delayAimTime > 0.0f) // 延迟
|
|
||||||
{
|
|
||||||
delayAim = true;
|
|
||||||
}
|
|
||||||
else // 立即
|
|
||||||
{
|
|
||||||
delayAim = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StartSearch()
|
|
||||||
{
|
|
||||||
if (IsSearchByCollider)
|
|
||||||
{
|
|
||||||
isActive = true;
|
|
||||||
effectOver = false;
|
|
||||||
waitRecycle = false;
|
|
||||||
SetColliderEnabled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
|
||||||
{
|
|
||||||
var id = other.gameObject.GetInstanceID();
|
|
||||||
if (!CheckTargetDict.TryAdd(id))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
CheckTargetList.Add(other.gameObject);
|
|
||||||
if (checkInterval > 0.000001f) // 持续型范围技能,进入范围的时候立即生效一次
|
|
||||||
{
|
|
||||||
admin.OnHitTarget(other.gameObject, skillId, cloneIndex, skillEffectIndex);
|
|
||||||
var target = BF.BFMain.Instance.BattleMgr.PoolHelper.GetContinuousTarge();
|
|
||||||
target.Unit = other.gameObject;
|
|
||||||
target.Time = checkInterval;
|
|
||||||
ContinuousTargetsList.Add(target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnTriggerExit(Collider other)
|
|
||||||
{
|
|
||||||
var gameObject = other.gameObject;
|
|
||||||
var id = gameObject.GetInstanceID();
|
|
||||||
if (CheckTargetDict.Contains(id))
|
|
||||||
{
|
|
||||||
CheckTargetList.Remove(gameObject);
|
|
||||||
if (checkInterval > 0.000001f) // 持续型范围技能,进入范围的时候立即生效一次
|
|
||||||
{
|
|
||||||
var count = ContinuousTargetsList.Count;
|
|
||||||
for (int i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
if (gameObject == ContinuousTargetsList[i].Unit)
|
|
||||||
{
|
|
||||||
ContinuousTargetsList.RemoveAt(i);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddCheckTargetList(GameObject gameObject)
|
|
||||||
{
|
|
||||||
CheckTargetList.Add(gameObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SearchNearestTarget()
|
|
||||||
{
|
|
||||||
var control = BF.BFMain.Instance.BattleMgr.GetNearestUnit(admin.Side);
|
|
||||||
if(ReferenceEquals(control, null))
|
|
||||||
{
|
|
||||||
Recycle();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
CheckTargetList.Add(control.gameObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SearchAllTargets()
|
|
||||||
{
|
|
||||||
var unitsList = BF.BFMain.Instance.BattleMgr.GetUnitsList(admin.Side);
|
|
||||||
for (int i = 0; i < unitsList.Count; i++)
|
|
||||||
{
|
|
||||||
CheckTargetList.Add(unitsList[i].gameObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void CheckCollider()
|
|
||||||
{
|
|
||||||
CheckSurroundingTargets();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckSurroundingTargets()
|
|
||||||
{
|
|
||||||
if (checkInterval <= 0.000001f)
|
|
||||||
{
|
|
||||||
if (effectOver)
|
|
||||||
{
|
|
||||||
if (waitRecycle)
|
|
||||||
{
|
|
||||||
if (!unlimitCount)
|
|
||||||
{
|
|
||||||
FindNearestAndHit();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HitTargets();
|
|
||||||
}
|
|
||||||
Recycle();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
waitRecycle = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
effectOver = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void FindNearestAndHit()
|
|
||||||
{
|
|
||||||
var count = CheckTargetList.Count;
|
|
||||||
if (count <= 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
GameObject unit = null;
|
|
||||||
var position = admin.transform.position;
|
|
||||||
Vector2A.Set(position.x, position.z);
|
|
||||||
float minDis = float.MaxValue;
|
|
||||||
for(int j = 0; j < count; j++)
|
|
||||||
{
|
|
||||||
var objB = CheckTargetList[j];
|
|
||||||
Vector2B.Set(objB.transform.position.x, objB.transform.position.z);
|
|
||||||
var dis = (Vector2B - Vector2A).sqrMagnitude;
|
|
||||||
if (dis < minDis)
|
|
||||||
{
|
|
||||||
minDis = dis;
|
|
||||||
unit = objB;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(unit, null))
|
|
||||||
{
|
|
||||||
admin.OnHitTarget(unit, skillId, cloneIndex, skillEffectIndex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HitTargets()
|
|
||||||
{
|
|
||||||
var count = CheckTargetList.Count;
|
|
||||||
if (count <= 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (int i = count - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
admin.OnHitTarget(CheckTargetList[i], skillId, cloneIndex, skillEffectIndex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetSearchTargetsCount()
|
|
||||||
{
|
|
||||||
return CheckTargetList.Count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetTargetId(int index)
|
|
||||||
{
|
|
||||||
if (index >= 0 && index < CheckTargetList.Count)
|
|
||||||
{
|
|
||||||
return CheckTargetList[index].GetInstanceID();
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Update()
|
|
||||||
{
|
|
||||||
if (delayAim)
|
|
||||||
{
|
|
||||||
delayAimTime -= Time.deltaTime*BattleConfigure.TimeScale;
|
|
||||||
if (delayAimTime < 0.0f)
|
|
||||||
{
|
|
||||||
delayAim = false;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (aimFollow)
|
|
||||||
{
|
|
||||||
var deltaTime = Time.deltaTime*BattleConfigure.TimeScale;
|
|
||||||
aimFollowTime -= deltaTime;
|
|
||||||
if (aimFollowTime < 0.0f)
|
|
||||||
{
|
|
||||||
aimFollow = false;
|
|
||||||
}
|
|
||||||
FollowTarget(deltaTime);
|
|
||||||
}
|
|
||||||
if (!isActive)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (updatePositionWithLockTarget)
|
|
||||||
{
|
|
||||||
UpdatePositionByLockTargetPosition();
|
|
||||||
}
|
|
||||||
var count = ContinuousTargetsList.Count;
|
|
||||||
if (count <= 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
BattleContinuousTarget target = null;
|
|
||||||
var deltaTime2 = Time.deltaTime*BattleConfigure.TimeScale;
|
|
||||||
for (int i = count - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
target = ContinuousTargetsList[i];
|
|
||||||
target.Time -= deltaTime2;
|
|
||||||
if (target.Time <= 0.0f)
|
|
||||||
{
|
|
||||||
target.Time = checkInterval;
|
|
||||||
admin.OnHitTarget(target.Unit, skillId, cloneIndex, skillEffectIndex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: d4fb90d05a9d73b438f7fa1e4d7baf32
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,103 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlColliderContainer
|
|
||||||
{
|
|
||||||
[System.NonSerialized]
|
|
||||||
public bool IsRecycle = false;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public bool IsSearchByCollider = false;
|
|
||||||
private List<BattleControlCollider> colliderList = new List<BattleControlCollider>();
|
|
||||||
|
|
||||||
public void InitBase()
|
|
||||||
{
|
|
||||||
colliderList.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetIsSearchByCollider(bool isSearchByCollider)
|
|
||||||
{
|
|
||||||
IsSearchByCollider = isSearchByCollider;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Add(BattleControlCollider collider)
|
|
||||||
{
|
|
||||||
colliderList.Add(collider);
|
|
||||||
collider.SetContainer(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Remove(BattleControlCollider collider)
|
|
||||||
{
|
|
||||||
colliderList.Remove(collider);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetSearchTargetsCount()
|
|
||||||
{
|
|
||||||
var count = 0;
|
|
||||||
for (int i = 0; i < colliderList.Count; i++)
|
|
||||||
{
|
|
||||||
count += colliderList[i].GetSearchTargetsCount();
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetCollidersCount()
|
|
||||||
{
|
|
||||||
return colliderList.Count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlCollider GetCollider(int colliderIndex)
|
|
||||||
{
|
|
||||||
return colliderList[colliderIndex];
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetTargetId(int colliderIndex, int index)
|
|
||||||
{
|
|
||||||
return colliderList[colliderIndex].GetTargetId(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CachePosition(int index)
|
|
||||||
{
|
|
||||||
colliderList[index].CachePosition();
|
|
||||||
}
|
|
||||||
|
|
||||||
public float FastGetColliderX(int index)
|
|
||||||
{
|
|
||||||
return colliderList[index].CacheX;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float FastGetColliderZ(int index)
|
|
||||||
{
|
|
||||||
return colliderList[index].CacheZ;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StartSearch()
|
|
||||||
{
|
|
||||||
for (int i = 0; i < colliderList.Count; i++)
|
|
||||||
{
|
|
||||||
colliderList[i].StartSearch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool GetIsFinished()
|
|
||||||
{
|
|
||||||
if (IsSearchByCollider && colliderList.Count > 0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Recycle()
|
|
||||||
{
|
|
||||||
for (int i = 0; i < colliderList.Count; i++)
|
|
||||||
{
|
|
||||||
colliderList[i].RemoveFromContainer();
|
|
||||||
colliderList[i].Recycle();
|
|
||||||
}
|
|
||||||
colliderList.Clear();
|
|
||||||
BFMain.Instance.BattleMgr.PoolHelper.RecycleColliderContainer(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: d5a2f8c0b2efbbf4ca08b2f87f287b92
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,344 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlHero : BattleControlUnit
|
|
||||||
{
|
|
||||||
private Camera mainCamera;
|
|
||||||
private Rigidbody unitRigidbody;
|
|
||||||
private bool isMoving = false;
|
|
||||||
private float TargetX = 0.0f;
|
|
||||||
private float TargetZ = 0.0f;
|
|
||||||
private float moveSpeed = 1.0f;
|
|
||||||
private Vector3 targetPosition = Vector3.zero;
|
|
||||||
// 摄像机相关
|
|
||||||
public bool IsCameraFollowWithHero = true;
|
|
||||||
private Vector3 cameraOriginPosition = Vector3.zero;
|
|
||||||
|
|
||||||
void Awake()
|
|
||||||
{
|
|
||||||
mainCamera = Camera.main;
|
|
||||||
InitRigidbody();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void InitRigidbody()
|
|
||||||
{
|
|
||||||
if (!gameObject.TryGetComponent<Rigidbody>(out unitRigidbody))
|
|
||||||
{
|
|
||||||
unitRigidbody = gameObject.AddComponent<Rigidbody>();
|
|
||||||
}
|
|
||||||
unitRigidbody.angularDrag = 0;
|
|
||||||
unitRigidbody.useGravity = false;
|
|
||||||
unitRigidbody.isKinematic = true;
|
|
||||||
unitRigidbody.constraints = BattleConst.RIGIDBODY_CONSTRAINTS;
|
|
||||||
bodyCollider = gameObject.AddComponent<SphereCollider>();
|
|
||||||
bodyCollider.isTrigger = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitHero(int side, CharacterSpineHelper helper)
|
|
||||||
{
|
|
||||||
Side = side;
|
|
||||||
BattleMgr = BF.BFMain.Instance.BattleMgr;
|
|
||||||
Direction = 1;
|
|
||||||
gameObject.layer = BattleConst.LAYER_HERO;
|
|
||||||
ReuseFlag++;
|
|
||||||
IsDead = false;
|
|
||||||
IsInGroundState = false;
|
|
||||||
IsDisappear = false;
|
|
||||||
BattleMgr.AddToAtkUnitsList(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void InitHpBar()
|
|
||||||
{
|
|
||||||
if (isHaveHpBar)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hpBar = BattleMgr.PoolHelper.GetHpBar(Side);
|
|
||||||
hpBar.transform.localScale = Vector3.one;
|
|
||||||
hpBar.RefreshHpBar(1.0f);
|
|
||||||
hpBar.SetShieldVisible(false);
|
|
||||||
BattleMgr.UpdateUIPosition(transform.position, HpBarAddY, hpBar.transform as RectTransform);
|
|
||||||
isHaveHpBar = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void RefreshHpBar(float percent)
|
|
||||||
{
|
|
||||||
if (!isHaveHpBar)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hpBar.RefreshHpBar(percent);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void RefreshShieldBar(float percent, bool visible)
|
|
||||||
{
|
|
||||||
if (!isHaveHpBar)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (visible)
|
|
||||||
{
|
|
||||||
hpBar.RefreshShieldBar(percent);
|
|
||||||
}
|
|
||||||
hpBar.SetShieldVisible(visible);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetCameraStartPosition(Vector3 originPosition)
|
|
||||||
{
|
|
||||||
cameraOriginPosition = originPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool MoveAndAttack(int direction)
|
|
||||||
{
|
|
||||||
isMoving = true;
|
|
||||||
bool isAttack = true;
|
|
||||||
var x = transform.position.x;
|
|
||||||
var z = transform.position.z;
|
|
||||||
if (direction == 1) // 朝向右边
|
|
||||||
{
|
|
||||||
BattleControlUnit leftTarget = null;
|
|
||||||
BattleControlUnit rightTarget = null;
|
|
||||||
BattleMgr.GetNearestDefUnit(x, z, out leftTarget, out rightTarget);
|
|
||||||
if (ReferenceEquals(rightTarget, null)) // 右边没有敌人
|
|
||||||
{
|
|
||||||
if (ReferenceEquals(leftTarget, null)) // 左边也没有敌人则向该方向进行常规攻击,同时推进
|
|
||||||
{
|
|
||||||
if (BattleMgr.GetEffectWarningCount() <= 0)
|
|
||||||
{
|
|
||||||
TargetX = x + BattleConfigure.DistanceAttack;
|
|
||||||
TargetZ = z;
|
|
||||||
Direction = direction;
|
|
||||||
}
|
|
||||||
else // 找不到人,但是有预警的话就往该方向后撤
|
|
||||||
{
|
|
||||||
TargetX = x + BattleConfigure.DistanceBack;
|
|
||||||
TargetZ = z;
|
|
||||||
isAttack = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // 左边有敌人,则向该方向进行后撤,并且当前朝向不变
|
|
||||||
{
|
|
||||||
TargetX = x + BattleConfigure.DistanceBack;
|
|
||||||
TargetZ = z;
|
|
||||||
isAttack = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // 右边有敌人,向目标进行冲锋推进攻击
|
|
||||||
{
|
|
||||||
TargetX = rightTarget.transform.position.x - rightTarget.BodyRadius - BodyRadius;
|
|
||||||
if (TargetX - x > BattleConfigure.DistanceDash)
|
|
||||||
{
|
|
||||||
TargetX = x + BattleConfigure.DistanceDash;
|
|
||||||
}
|
|
||||||
TargetZ = rightTarget.transform.position.z;
|
|
||||||
Direction = direction;
|
|
||||||
}
|
|
||||||
targetPosition = new Vector3(TargetX, 0.0f, TargetZ);
|
|
||||||
var distance = (targetPosition - transform.position).magnitude;
|
|
||||||
if (isAttack)
|
|
||||||
{
|
|
||||||
moveSpeed = Math.Abs(distance / BattleConfigure.NormalMoveTime);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
moveSpeed = Math.Abs(distance / BattleConfigure.NormalBackTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
BattleControlUnit leftTarget = null;
|
|
||||||
BattleControlUnit rightTarget = null;
|
|
||||||
BattleMgr.GetNearestDefUnit(x, z, out leftTarget, out rightTarget);
|
|
||||||
if (ReferenceEquals(leftTarget, null)) // 左边没有敌人
|
|
||||||
{
|
|
||||||
if (ReferenceEquals(rightTarget, null)) // 右边也没有敌人则向该方向进行常规攻击,同时推进
|
|
||||||
{
|
|
||||||
if (BattleMgr.GetEffectWarningCount() <= 0)
|
|
||||||
{
|
|
||||||
TargetX = x - BattleConfigure.DistanceAttack;
|
|
||||||
TargetZ = transform.position.z;
|
|
||||||
Direction = direction;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TargetX = x - BattleConfigure.DistanceBack;
|
|
||||||
TargetZ = transform.position.z;
|
|
||||||
isAttack = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // 右边有敌人,则向该方向进行后撤,并且当前朝向不变
|
|
||||||
{
|
|
||||||
TargetX = x - BattleConfigure.DistanceBack;
|
|
||||||
TargetZ = transform.position.z;
|
|
||||||
isAttack = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // 左边有敌人,向目标进行冲锋推进攻击
|
|
||||||
{
|
|
||||||
TargetX = leftTarget.transform.position.x + leftTarget.BodyRadius + BodyRadius;
|
|
||||||
if (x - TargetX > BattleConfigure.DistanceDash)
|
|
||||||
{
|
|
||||||
TargetX = x - BattleConfigure.DistanceDash;
|
|
||||||
}
|
|
||||||
TargetZ = leftTarget.transform.position.z;
|
|
||||||
Direction = direction;
|
|
||||||
}
|
|
||||||
targetPosition = new Vector3(TargetX, 0.0f, TargetZ);
|
|
||||||
var distance = (targetPosition - transform.position).magnitude;
|
|
||||||
if (isAttack)
|
|
||||||
{
|
|
||||||
moveSpeed = Math.Abs(distance / BattleConfigure.NormalMoveTime);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
moveSpeed = Math.Abs(distance / BattleConfigure.NormalBackTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return isAttack;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetNearestLeftRightUnit()
|
|
||||||
{
|
|
||||||
BattleControlUnit leftTarget = null;
|
|
||||||
BattleControlUnit rightTarget = null;
|
|
||||||
BattleMgr.GetNearestDefUnit(transform.position.x, transform.position.z, out leftTarget, out rightTarget);
|
|
||||||
if (ReferenceEquals(leftTarget, null))
|
|
||||||
{
|
|
||||||
if (ReferenceEquals(rightTarget, null))
|
|
||||||
{
|
|
||||||
return 0; // 两边都没有敌人
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 2; // 只有右边有敌人
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (ReferenceEquals(rightTarget, null))
|
|
||||||
{
|
|
||||||
return 1; // 只有左边有敌人
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var leftDistance = Mathf.Abs(transform.position.x - leftTarget.transform.position.x);
|
|
||||||
var rightDistance = Mathf.Abs(transform.position.x - rightTarget.transform.position.x);
|
|
||||||
if (leftDistance < rightDistance)
|
|
||||||
{
|
|
||||||
return 1; // 左边的敌人离得更近
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 2; // 右边的敌人离得更近
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool GetWhetherUseGroundSkill()
|
|
||||||
{
|
|
||||||
var unit = BattleMgr.GetNearestDefUnitOnCurrDirection(transform.position.x, transform.position.z, Direction);
|
|
||||||
if (ReferenceEquals(unit, null))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return unit.IsInGroundState;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StopMove()
|
|
||||||
{
|
|
||||||
isMoving = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StartMove()
|
|
||||||
{
|
|
||||||
isMoving = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private float GetMoveSpeed()
|
|
||||||
{
|
|
||||||
return moveSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnDead()
|
|
||||||
{
|
|
||||||
IsDead = true;
|
|
||||||
IsInGroundState = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Reborn()
|
|
||||||
{
|
|
||||||
IsDead = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Revive()
|
|
||||||
{
|
|
||||||
IsDead = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Clear()
|
|
||||||
{
|
|
||||||
luaOnHitTargetFunc = null;
|
|
||||||
if (isHaveHpBar)
|
|
||||||
{
|
|
||||||
BattleMgr.PoolHelper.PutBackHpBar(hpBar, Side);
|
|
||||||
hpBar = null;
|
|
||||||
isHaveHpBar = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
if (!isMoving)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((transform.position - targetPosition).sqrMagnitude < 0.0001)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var moveToPosition = Vector3.MoveTowards(transform.position, targetPosition, GetMoveSpeed() * Time.deltaTime*BattleConfigure.TimeScale);
|
|
||||||
if (moveToPosition.x < BattleConfigure.SceneMinX)
|
|
||||||
{
|
|
||||||
moveToPosition.x = BattleConfigure.SceneMinX;
|
|
||||||
}
|
|
||||||
else if (moveToPosition.x > BattleConfigure.SceneMaxX)
|
|
||||||
{
|
|
||||||
moveToPosition.x = BattleConfigure.SceneMaxX;
|
|
||||||
}
|
|
||||||
transform.position = moveToPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LateUpdate()
|
|
||||||
{
|
|
||||||
if (IsCameraFollowWithHero)
|
|
||||||
{
|
|
||||||
var position = cameraOriginPosition + new Vector3(transform.localPosition.x, 0.0f, 0.0f);
|
|
||||||
if (position.x < BattleConfigure.CameraMinX)
|
|
||||||
{
|
|
||||||
position.x = BattleConfigure.CameraMinX;
|
|
||||||
}
|
|
||||||
else if (position.x > BattleConfigure.CameraMaxX)
|
|
||||||
{
|
|
||||||
position.x = BattleConfigure.CameraMaxX;
|
|
||||||
}
|
|
||||||
mainCamera.transform.position = position;
|
|
||||||
BattleConfigure.BattleCenterPosX = position.x;
|
|
||||||
BattleMgr.UpdateEffectTextRootNode();
|
|
||||||
}
|
|
||||||
if (isHaveHpBar && isMoving)
|
|
||||||
{
|
|
||||||
BattleMgr.UpdateUIPosition(transform.position, HpBarAddY, hpBar.transform as RectTransform);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnDestroy()
|
|
||||||
{
|
|
||||||
luaOnHitTargetFunc = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c2f0a4037a9edf24dab741e7424bf814
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,581 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using DG.Tweening;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlMonster : BattleControlUnit
|
|
||||||
{
|
|
||||||
private CharacterSpineHelper spineHelper;
|
|
||||||
private Rigidbody unitRigidbody;
|
|
||||||
private Transform mainBody;
|
|
||||||
private bool isMoving = false;
|
|
||||||
private float checkTowardTime = 0.1f;
|
|
||||||
private float checkAITargetPositionTime = 0.1f;
|
|
||||||
private int horizontalTypeAI = 0;
|
|
||||||
private float offsetXAI = 0.0f;
|
|
||||||
private float offsetZAI = 0.0f;
|
|
||||||
private Sequence airborneSeq;
|
|
||||||
private bool isHitBack = true;
|
|
||||||
private float hitBackTime = 0.0f;
|
|
||||||
private float hitBackSpeed = 0.0f;
|
|
||||||
void Awake()
|
|
||||||
{
|
|
||||||
InitRigidbody();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void InitRigidbody()
|
|
||||||
{
|
|
||||||
if (!gameObject.TryGetComponent<Rigidbody>(out unitRigidbody))
|
|
||||||
{
|
|
||||||
unitRigidbody = gameObject.AddComponent<Rigidbody>();
|
|
||||||
}
|
|
||||||
unitRigidbody.angularDrag = 0;
|
|
||||||
unitRigidbody.useGravity = false;
|
|
||||||
unitRigidbody.isKinematic = true;
|
|
||||||
unitRigidbody.constraints = BattleConst.RIGIDBODY_CONSTRAINTS;
|
|
||||||
bodyCollider = gameObject.AddComponent<SphereCollider>();
|
|
||||||
bodyCollider.isTrigger = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitMonster(int side, CharacterSpineHelper helper, Transform body)
|
|
||||||
{
|
|
||||||
Side = side;
|
|
||||||
BattleMgr = BF.BFMain.Instance.BattleMgr;
|
|
||||||
spineHelper = helper;
|
|
||||||
mainBody = body;
|
|
||||||
if (ReferenceEquals(mainBody, null))
|
|
||||||
{
|
|
||||||
mainBody = transform.GetChild(0);
|
|
||||||
}
|
|
||||||
Direction = 1;
|
|
||||||
isMoving = false;
|
|
||||||
IsDead = false;
|
|
||||||
IsInGroundState = false;
|
|
||||||
Target = null;
|
|
||||||
IsDisappear = false;
|
|
||||||
BattleMgr.AddToDefUnitsList(this);
|
|
||||||
gameObject.layer = BattleConst.LAYER_MONSTER;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void InitHpBar()
|
|
||||||
{
|
|
||||||
if (isHaveHpBar)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hpBar = BattleMgr.PoolHelper.GetHpBar(Side);
|
|
||||||
hpBar.transform.localScale = Vector3.one;
|
|
||||||
hpBar.RefreshHpBar(1.0f);
|
|
||||||
BattleMgr.UpdateUIPosition(transform.position, HpBarAddY, hpBar.transform as RectTransform);
|
|
||||||
isHaveHpBar = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void RefreshHpBar(float percent)
|
|
||||||
{
|
|
||||||
if (!isHaveHpBar)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hpBar.RefreshHpBar(percent);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitPosition(float x, float y, float z)
|
|
||||||
{
|
|
||||||
transform.position = new Vector3(x, y, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void EnterDisappear()
|
|
||||||
{
|
|
||||||
gameObject.layer = BattleConst.LAYER_DEFAULT;
|
|
||||||
BattleMgr.RemoveFromDefUnitsList(this);
|
|
||||||
if (isHaveHpBar)
|
|
||||||
{
|
|
||||||
hpBar.transform.localScale = Vector3.zero;
|
|
||||||
}
|
|
||||||
if (IsHaveShadow)
|
|
||||||
{
|
|
||||||
shadow.transform.localScale = Vector3.zero;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void ExitDisappear()
|
|
||||||
{
|
|
||||||
gameObject.layer = BattleConst.LAYER_MONSTER;
|
|
||||||
BattleMgr.AddToDefUnitsList(this);
|
|
||||||
if (isHaveHpBar)
|
|
||||||
{
|
|
||||||
hpBar.transform.localScale = Vector3.one;
|
|
||||||
}
|
|
||||||
if (IsHaveShadow)
|
|
||||||
{
|
|
||||||
shadow.transform.localScale = Vector3.one*BodyRadius*2.0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetTarget(BattleControlUnit target)
|
|
||||||
{
|
|
||||||
Target = target;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool GetIsNormalMonster()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool GetIsBOSS()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StopMove()
|
|
||||||
{
|
|
||||||
isMoving = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StartMove()
|
|
||||||
{
|
|
||||||
isMoving = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 秒杀
|
|
||||||
public void InstantKill()
|
|
||||||
{
|
|
||||||
OnDead();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void PlayAirborne()
|
|
||||||
{
|
|
||||||
if (ReferenceEquals(airborneSeq, null))
|
|
||||||
{
|
|
||||||
airborneSeq = BattleHelper.CreateSequence();
|
|
||||||
var time = BattleConfigure.TimeHitFly;
|
|
||||||
var tween1 = mainBody.DOLocalMoveY(BattleConfigure.HeightHitFly, time*3.0f/5.0f).SetEase(Ease.OutQuart);
|
|
||||||
tween1.intId = BattleConst.DOTWEEN_ID_BATTLE;
|
|
||||||
var tween2 = mainBody.DOLocalMoveY(0.0f, time*2.0f/5.0f);
|
|
||||||
tween2.intId = BattleConst.DOTWEEN_ID_BATTLE;
|
|
||||||
airborneSeq.Append(tween1);
|
|
||||||
airborneSeq.Append(tween2);
|
|
||||||
airborneSeq.SetAutoKill(false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
airborneSeq.Restart();
|
|
||||||
}
|
|
||||||
isHitBack = true;
|
|
||||||
hitBackTime = BattleConfigure.TimeHitFly;
|
|
||||||
hitBackSpeed = BattleConfigure.DistanceHitFly / hitBackTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void StopAirborne()
|
|
||||||
{
|
|
||||||
if (!ReferenceEquals(airborneSeq, null))
|
|
||||||
{
|
|
||||||
airborneSeq.Pause();
|
|
||||||
}
|
|
||||||
mainBody.localPosition = Vector3.zero;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void MoveWithSkillAI(int target, int horizontal, float x, float z, int refresh, int across, float speed, int endType, float endValue, int collisionType)
|
|
||||||
{
|
|
||||||
StartMove();
|
|
||||||
targetTypeAI = target;
|
|
||||||
horizontalTypeAI = horizontal;
|
|
||||||
offsetXAI = x;
|
|
||||||
offsetZAI = z;
|
|
||||||
keepUpdateTargetPositionAI = refresh == 1;
|
|
||||||
isCanAcrossTarget = across == 1;
|
|
||||||
moveSpeedAI = speed;
|
|
||||||
isTeleport = moveSpeedAI < 0.000001f;
|
|
||||||
endTypeAI = endType;
|
|
||||||
if (endTypeAI == 1)
|
|
||||||
{
|
|
||||||
endValueAI = endValue*endValue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
endValueAI = endValue;
|
|
||||||
}
|
|
||||||
collisionTypeAI = collisionType;
|
|
||||||
FindTargetPosition();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FindTargetPosition()
|
|
||||||
{
|
|
||||||
if (targetTypeAI == 1) // 自身
|
|
||||||
{
|
|
||||||
FindTargetPositionAISelf();
|
|
||||||
CheckTargetPositionAIOutWall();
|
|
||||||
}
|
|
||||||
else if(targetTypeAI == 2) // 目标
|
|
||||||
{
|
|
||||||
FindTargetPositionAITarget();
|
|
||||||
CheckTargetPositionAIOutWall();
|
|
||||||
}
|
|
||||||
else if(targetTypeAI == 3) // 场地中央
|
|
||||||
{
|
|
||||||
FindTargetPositionAIMiddle();
|
|
||||||
CheckTargetPositionAIOutWall();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
StopMove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FindTargetPositionAITarget()
|
|
||||||
{
|
|
||||||
if (horizontalTypeAI == 1)
|
|
||||||
{
|
|
||||||
if (Target.transform.position.x < transform.position.x) // 目标在自己的左边
|
|
||||||
{
|
|
||||||
targetPositionAI = Target.transform.position + new Vector3(-offsetXAI, 0.0f, offsetZAI);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
targetPositionAI = Target.transform.position + new Vector3(offsetXAI, 0.0f, offsetZAI);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(horizontalTypeAI == 2)
|
|
||||||
{
|
|
||||||
var deltaX = transform.position.x - Target.transform.position.x;
|
|
||||||
var deltaZ = transform.position.z - Target.transform.position.z;
|
|
||||||
var radian = Mathf.Atan2(deltaZ, deltaX);
|
|
||||||
var x = -offsetXAI*Mathf.Cos(radian);
|
|
||||||
var z = -offsetXAI*Mathf.Sin(radian);
|
|
||||||
targetPositionAI = new Vector3(Target.transform.position.x + x, 0.0f, Target.transform.position.z + z);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FindTargetPositionAISelf()
|
|
||||||
{
|
|
||||||
if (Direction == 1)
|
|
||||||
{
|
|
||||||
targetPositionAI = transform.position + new Vector3(offsetXAI, 0.0f, offsetZAI);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
targetPositionAI = transform.position + new Vector3(-offsetXAI, 0.0f, offsetZAI);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FindTargetPositionAIMiddle()
|
|
||||||
{
|
|
||||||
if (horizontalTypeAI == 1)
|
|
||||||
{
|
|
||||||
if (BattleConfigure.SceneMidX < transform.position.x) // 自己在场景右边
|
|
||||||
{
|
|
||||||
targetPositionAI = new Vector3(-offsetXAI + BattleConfigure.SceneMidX, 0.0f, offsetZAI + BattleConfigure.SceneMidZ);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
targetPositionAI = transform.position + new Vector3(offsetXAI + BattleConfigure.SceneMidX, 0.0f, offsetZAI + BattleConfigure.SceneMidZ);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(horizontalTypeAI == 2)
|
|
||||||
{
|
|
||||||
var deltaX = transform.position.x - BattleConfigure.SceneMidX;
|
|
||||||
var deltaZ = transform.position.z - BattleConfigure.SceneMidZ;
|
|
||||||
var radian = Mathf.Atan2(deltaZ, deltaX);
|
|
||||||
var x = -offsetXAI*Mathf.Cos(radian);
|
|
||||||
var z = -offsetXAI*Mathf.Sin(radian);
|
|
||||||
targetPositionAI = new Vector3(Target.transform.position.x + x, 0.0f, Target.transform.position.z + z);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckTargetPositionAIOutWall()
|
|
||||||
{
|
|
||||||
if (targetPositionAI.x < BattleConfigure.SceneMinX) // 撞左边墙了
|
|
||||||
{
|
|
||||||
targetPositionAI.x = BattleConfigure.SceneMinX;
|
|
||||||
}
|
|
||||||
else if (targetPositionAI.x > BattleConfigure.SceneMaxX) // 撞右边墙了
|
|
||||||
{
|
|
||||||
targetPositionAI.x = BattleConfigure.SceneMaxX;
|
|
||||||
}
|
|
||||||
if (targetPositionAI.z < BattleConfigure.SceneMinZ) // 撞左边墙了
|
|
||||||
{
|
|
||||||
targetPositionAI.z = BattleConfigure.SceneMinZ;
|
|
||||||
}
|
|
||||||
else if (targetPositionAI.z > BattleConfigure.SceneMaxZ) // 撞右边墙了
|
|
||||||
{
|
|
||||||
targetPositionAI.z = BattleConfigure.SceneMaxZ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
var deltaTime = Time.deltaTime*BattleConfigure.TimeScale;
|
|
||||||
if (!isMoving)
|
|
||||||
{
|
|
||||||
if (isHitBack)
|
|
||||||
{
|
|
||||||
UpdateHitBackMove(deltaTime);
|
|
||||||
}
|
|
||||||
CheckToward(deltaTime);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
UpdateAIMoveing(deltaTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LateUpdate()
|
|
||||||
{
|
|
||||||
// TODO 后续可以优化成怪物移动或者相机移动的时候更新
|
|
||||||
if (isHaveHpBar)
|
|
||||||
{
|
|
||||||
BattleMgr.UpdateUIPosition(transform.position, HpBarAddY, hpBar.transform as RectTransform);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckToward(float deltaTime)
|
|
||||||
{
|
|
||||||
if (IsDead)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
checkTowardTime -= deltaTime;
|
|
||||||
if (checkTowardTime < 0.0f)
|
|
||||||
{
|
|
||||||
checkTowardTime = BattleConfigure.CheckMonsterTowardInterval;
|
|
||||||
TowardToTarget();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void TowardToTarget()
|
|
||||||
{
|
|
||||||
if (Target.transform.position.x <= transform.position.x)
|
|
||||||
{
|
|
||||||
if (Direction != -1)
|
|
||||||
{
|
|
||||||
Direction = -1;
|
|
||||||
var bodyTransform = spineHelper.GetSpineObject().transform.parent;
|
|
||||||
bodyTransform.localScale = new Vector3(BattleConfigure.MonsterScaleFactorXZ*Direction, bodyTransform.localScale.y, bodyTransform.localScale.z);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (Direction != 1)
|
|
||||||
{
|
|
||||||
Direction = 1;
|
|
||||||
var bodyTransform = spineHelper.GetSpineObject().transform.parent;
|
|
||||||
bodyTransform.localScale = new Vector3(BattleConfigure.MonsterScaleFactorXZ*Direction, bodyTransform.localScale.y, bodyTransform.localScale.z);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void ForceTowardToTarget()
|
|
||||||
{
|
|
||||||
if (Target.transform.position.x <= transform.position.x)
|
|
||||||
{
|
|
||||||
Direction = -1;
|
|
||||||
var bodyTransform = spineHelper.GetSpineObject().transform.parent;
|
|
||||||
bodyTransform.localScale = new Vector3(BattleConfigure.MonsterScaleFactorXZ*Direction, bodyTransform.localScale.y, bodyTransform.localScale.z);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Direction = 1;
|
|
||||||
var bodyTransform = spineHelper.GetSpineObject().transform.parent;
|
|
||||||
bodyTransform.localScale = new Vector3(BattleConfigure.MonsterScaleFactorXZ*Direction, bodyTransform.localScale.y, bodyTransform.localScale.z);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateAIMoveing(float deltaTime)
|
|
||||||
{
|
|
||||||
if (endTypeAI == 1) // 按距离结束
|
|
||||||
{
|
|
||||||
if ((transform.position - targetPositionAI).sqrMagnitude < endValueAI)
|
|
||||||
{
|
|
||||||
FinishAIMove();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(endTypeAI == 2) // 按时间结束
|
|
||||||
{
|
|
||||||
endValueAI -= deltaTime;
|
|
||||||
if (endValueAI < 0.0f)
|
|
||||||
{
|
|
||||||
FinishAIMove();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ((transform.position - targetPositionAI).sqrMagnitude < 0.0001)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MoveToTarget(deltaTime);
|
|
||||||
if (keepUpdateTargetPositionAI)
|
|
||||||
{
|
|
||||||
checkAITargetPositionTime -= deltaTime;
|
|
||||||
if (checkAITargetPositionTime < 0.0f)
|
|
||||||
{
|
|
||||||
checkAITargetPositionTime = BattleConfigure.CheckAITargetPositionInterval;
|
|
||||||
FindTargetPosition();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MoveToTarget(float deltaTime)
|
|
||||||
{
|
|
||||||
Vector3 moveToPosition;
|
|
||||||
if (isTeleport)
|
|
||||||
{
|
|
||||||
if (isHitBack)
|
|
||||||
{
|
|
||||||
hitBackTime -= deltaTime;
|
|
||||||
if (hitBackTime < 0.0f)
|
|
||||||
{
|
|
||||||
isHitBack = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
moveToPosition = targetPositionAI;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (isHitBack)
|
|
||||||
{
|
|
||||||
hitBackTime -= deltaTime;
|
|
||||||
if (hitBackTime < 0.0f)
|
|
||||||
{
|
|
||||||
isHitBack = false;
|
|
||||||
}
|
|
||||||
moveToPosition = Vector3.MoveTowards(transform.position, transform.position + new Vector3(BattleConst.UNIT_MOVE_DISTANCE_OPPOSITE*Direction, 0.0f, 0.0f), hitBackSpeed * deltaTime);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
moveToPosition = Vector3.MoveTowards(transform.position, targetPositionAI, moveSpeedAI * deltaTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!isCanAcrossTarget) // 不能穿过目标
|
|
||||||
{
|
|
||||||
if (Target.transform.position.x <= transform.position.x) // 在目标左边
|
|
||||||
{
|
|
||||||
var limitX = Target.transform.position.x + Target.BodyRadius + BodyRadius;
|
|
||||||
if (moveToPosition.x < limitX)
|
|
||||||
{
|
|
||||||
moveToPosition.x = limitX;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var limitX = Target.transform.position.x - Target.BodyRadius - BodyRadius;
|
|
||||||
if (moveToPosition.x > limitX)
|
|
||||||
{
|
|
||||||
moveToPosition.x = limitX;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (moveToPosition.x < BattleConfigure.SceneMinX) // 撞左边墙了
|
|
||||||
{
|
|
||||||
moveToPosition.x = BattleConfigure.SceneMinX;
|
|
||||||
}
|
|
||||||
else if (moveToPosition.x > BattleConfigure.SceneMaxX) // 撞右边墙了
|
|
||||||
{
|
|
||||||
moveToPosition.x = BattleConfigure.SceneMaxX;
|
|
||||||
}
|
|
||||||
if (moveToPosition.z < BattleConfigure.SceneMinZ) // 撞左边墙了
|
|
||||||
{
|
|
||||||
moveToPosition.z = BattleConfigure.SceneMinZ;
|
|
||||||
}
|
|
||||||
else if (moveToPosition.z > BattleConfigure.SceneMaxZ) // 撞右边墙了
|
|
||||||
{
|
|
||||||
moveToPosition.z = BattleConfigure.SceneMaxZ;
|
|
||||||
}
|
|
||||||
transform.position = moveToPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateHitBackMove(float deltaTime)
|
|
||||||
{
|
|
||||||
hitBackTime -= deltaTime;
|
|
||||||
if (hitBackTime < 0.0f)
|
|
||||||
{
|
|
||||||
isHitBack = false;
|
|
||||||
}
|
|
||||||
var moveToPosition = Vector3.MoveTowards(transform.position, transform.position + new Vector3(BattleConst.UNIT_MOVE_DISTANCE_OPPOSITE*Direction, 0.0f, 0.0f), hitBackSpeed * deltaTime);
|
|
||||||
if (Target.transform.position.x <= transform.position.x) // 在目标左边
|
|
||||||
{
|
|
||||||
var limitX = Target.transform.position.x + Target.BodyRadius + BodyRadius;
|
|
||||||
if (moveToPosition.x < limitX)
|
|
||||||
{
|
|
||||||
moveToPosition.x = limitX;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var limitX = Target.transform.position.x - Target.BodyRadius - BodyRadius;
|
|
||||||
if (moveToPosition.x > limitX)
|
|
||||||
{
|
|
||||||
moveToPosition.x = limitX;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (moveToPosition.x < BattleConfigure.SceneMinX) // 撞左边墙了
|
|
||||||
{
|
|
||||||
moveToPosition.x = BattleConfigure.SceneMinX;
|
|
||||||
}
|
|
||||||
else if (moveToPosition.x > BattleConfigure.SceneMaxX) // 撞右边墙了
|
|
||||||
{
|
|
||||||
moveToPosition.x = BattleConfigure.SceneMaxX;
|
|
||||||
}
|
|
||||||
if (moveToPosition.z < BattleConfigure.SceneMinZ) // 撞左边墙了
|
|
||||||
{
|
|
||||||
moveToPosition.z = BattleConfigure.SceneMinZ;
|
|
||||||
}
|
|
||||||
else if (moveToPosition.z > BattleConfigure.SceneMaxZ) // 撞右边墙了
|
|
||||||
{
|
|
||||||
moveToPosition.z = BattleConfigure.SceneMaxZ;
|
|
||||||
}
|
|
||||||
transform.position = moveToPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void BeHitBack()
|
|
||||||
{
|
|
||||||
if (isHitBack)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
isHitBack = true;
|
|
||||||
hitBackTime = BattleConfigure.HitBackTime;
|
|
||||||
hitBackSpeed = BattleConfigure.DistanceHitBack / hitBackTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FinishAIMove()
|
|
||||||
{
|
|
||||||
StopMove();
|
|
||||||
luaOnFinishAIMoveFunc?.Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnDead()
|
|
||||||
{
|
|
||||||
IsDead = true;
|
|
||||||
IsInGroundState = false;
|
|
||||||
BattleMgr.RemoveFromDefUnitsList(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Clear()
|
|
||||||
{
|
|
||||||
luaOnHitTargetFunc = null;
|
|
||||||
luaOnFinishAIMoveFunc = null;
|
|
||||||
if (isHaveHpBar)
|
|
||||||
{
|
|
||||||
BattleMgr.PoolHelper.PutBackHpBar(hpBar, Side);
|
|
||||||
hpBar = null;
|
|
||||||
isHaveHpBar = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnDestroy()
|
|
||||||
{
|
|
||||||
luaOnHitTargetFunc = null;
|
|
||||||
luaOnFinishAIMoveFunc = null;
|
|
||||||
if (!ReferenceEquals(airborneSeq, null))
|
|
||||||
{
|
|
||||||
airborneSeq.Kill();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f8b7c8b3bf2a99041abe55b41965f017
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlMonsterExtend : MonoBehaviour
|
|
||||||
{
|
|
||||||
protected BattleControlMonster mainControl;
|
|
||||||
public void SetControl(BattleControlMonster control)
|
|
||||||
{
|
|
||||||
mainControl = control;
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual void Init(long id) {}
|
|
||||||
|
|
||||||
public virtual void OnRecycle() {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 418c7fd8773d75544906e43496dd4481
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlSphereBullet : BattleControlBullet
|
|
||||||
{
|
|
||||||
private SphereCollider sphereCollider;
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
sphereCollider = gameObject.AddComponent<SphereCollider>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetupSphereCollisionBody(float collisionRadius)
|
|
||||||
{
|
|
||||||
sphereCollider.center = Vector3.zero;
|
|
||||||
sphereCollider.radius = collisionRadius;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetColliderEnabled(bool enabled)
|
|
||||||
{
|
|
||||||
sphereCollider.enabled = enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Recycle()
|
|
||||||
{
|
|
||||||
if (IsRecycle)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sphereCollider.enabled = false;
|
|
||||||
BFMain.Instance.BattleMgr.PoolHelper.RecycleSphereBullet(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 886b166ecb4cc23459744e47400ee1b9
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlSphereCollider : BattleControlCollider
|
|
||||||
{
|
|
||||||
private SphereCollider sphereCollider;
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
sphereCollider = gameObject.AddComponent<SphereCollider>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetupCollisionBody(float collisionRadius, float x, float z)
|
|
||||||
{
|
|
||||||
sphereCollider.center = Vector3.zero;
|
|
||||||
sphereCollider.radius = collisionRadius;
|
|
||||||
offset = new Vector3(x, 0.0f, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetColliderEnabled(bool enabled)
|
|
||||||
{
|
|
||||||
sphereCollider.enabled = enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FixedUpdate()
|
|
||||||
{
|
|
||||||
if (!isActive)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
CheckCollider();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Recycle()
|
|
||||||
{
|
|
||||||
if (IsRecycle)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!ReferenceEquals(container, null))
|
|
||||||
{
|
|
||||||
container.Remove(this);
|
|
||||||
}
|
|
||||||
sphereCollider.enabled = false;
|
|
||||||
isActive = false;
|
|
||||||
BFMain.Instance.BattleMgr.PoolHelper.RecycleSkillSphereCollider(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 67d6001006b358b45b93f603662c2086
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,300 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlUnit : BattleControlBase
|
|
||||||
{
|
|
||||||
[System.NonSerialized]
|
|
||||||
public int UnitType = 0;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public float CacheX = 0.0f;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public float CacheY = 0.0f;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public float CacheZ = 0.0f;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public int Direction = 1;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public float BodyRadius = 0.0f; // 半径
|
|
||||||
[System.NonSerialized]
|
|
||||||
public bool IsDead = false;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public BattleManager BattleMgr;
|
|
||||||
protected SphereCollider bodyCollider;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public long ReuseFlag = 0;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public bool IsInGroundState = false;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public BattleControlUnit Target;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public bool IsDisappear = false;
|
|
||||||
protected Action<int, int, int, int> luaOnHitTargetFunc;
|
|
||||||
protected Action luaOnFinishAIMoveFunc;
|
|
||||||
protected int targetTypeAI = 0;
|
|
||||||
protected Vector3 targetPositionAI = Vector3.zero;
|
|
||||||
protected bool keepUpdateTargetPositionAI = false;
|
|
||||||
protected bool isCanAcrossTarget = false;
|
|
||||||
protected float moveSpeedAI = 0.0f;
|
|
||||||
protected bool isTeleport = false;
|
|
||||||
protected int endTypeAI = 0;
|
|
||||||
protected float endValueAI = 0.0f;
|
|
||||||
protected int collisionTypeAI = 0;
|
|
||||||
protected BattleHpBar hpBar;
|
|
||||||
protected bool isHaveHpBar = false;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public float HpBarAddY = 0.0f;
|
|
||||||
protected bool IsHaveShadow = false;
|
|
||||||
protected GameObject shadow;
|
|
||||||
public virtual void OnDead() {}
|
|
||||||
public virtual void Clear() {}
|
|
||||||
public virtual void Reborn() {}
|
|
||||||
public virtual void Revive() {}
|
|
||||||
public virtual void MoveWithSkillAI(int target, int horizontal, float x, float z, int refresh, int across, float speed, int endType, float endValue, int collisionType) {}
|
|
||||||
public virtual void PlayAirborne() {}
|
|
||||||
public virtual void StopAirborne() {}
|
|
||||||
public virtual void TowardToTarget() {}
|
|
||||||
public virtual void ForceTowardToTarget() {}
|
|
||||||
public virtual bool GetWhetherUseGroundSkill() { return false; }
|
|
||||||
public virtual void BeHitBack() {}
|
|
||||||
public virtual void EnterDisappear() {}
|
|
||||||
public virtual void ExitDisappear() {}
|
|
||||||
public virtual void RefreshHpBar(float percent) {}
|
|
||||||
public virtual void InitHpBar() {}
|
|
||||||
public virtual void RefreshShieldBar(float percent, bool visible) {}
|
|
||||||
public void CachePosition()
|
|
||||||
{
|
|
||||||
var position = transform.position;
|
|
||||||
CacheX = position.x;
|
|
||||||
CacheY = position.y;
|
|
||||||
CacheZ = position.z;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CacheLocalEulerAnglesY()
|
|
||||||
{
|
|
||||||
CacheY = transform.localEulerAngles.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitCircleBody(float radius)
|
|
||||||
{
|
|
||||||
BodyRadius = radius;
|
|
||||||
bodyCollider.radius = radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetDisappear(bool isDisappear)
|
|
||||||
{
|
|
||||||
if (IsDisappear == isDisappear)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
IsDisappear = isDisappear;
|
|
||||||
if (isDisappear) // 进入消失状态
|
|
||||||
{
|
|
||||||
EnterDisappear();
|
|
||||||
}
|
|
||||||
else // 取消消失状态
|
|
||||||
{
|
|
||||||
ExitDisappear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlBoxCollider GetSkillBoxCollider()
|
|
||||||
{
|
|
||||||
var boxCollider = BattleMgr.PoolHelper.GetSkillBoxCollider();
|
|
||||||
if (ReferenceEquals(boxCollider, null))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
boxCollider.SetAdmin(this);
|
|
||||||
return boxCollider;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlSphereCollider GetSkillSphereCollider()
|
|
||||||
{
|
|
||||||
var sphereCollider = BattleMgr.PoolHelper.GetSkillSphereCollider();
|
|
||||||
if (ReferenceEquals(sphereCollider, null))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
sphereCollider.SetAdmin(this);
|
|
||||||
return sphereCollider;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlCollider GetSkillCollider(int rangeType, float collisionValue1, float collisionValue2, float x, float z)
|
|
||||||
{
|
|
||||||
if (rangeType == 1)
|
|
||||||
{
|
|
||||||
BattleControlBoxCollider box = GetSkillBoxCollider();
|
|
||||||
box.SetupCollisionBody(collisionValue1, collisionValue2, x, z);
|
|
||||||
return box;
|
|
||||||
}
|
|
||||||
var sphere = GetSkillSphereCollider();
|
|
||||||
sphere.SetupCollisionBody(collisionValue1, x, z);
|
|
||||||
return sphere;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlColliderContainer UseSkillColliders(int aimSearchType, int rangeType, float interval, float duration, int skillId, int cloneIndex, int skillEffectIndex, bool unlimitCount, float delayAimTime, float aimFollowTime, float aimFollowSpeed, float collisionValue1, float collisionValue2, float x, float z, bool disposable)
|
|
||||||
{
|
|
||||||
BattleControlCollider collider;
|
|
||||||
BattleControlColliderContainer colliderContainer = null;
|
|
||||||
switch(aimSearchType)
|
|
||||||
{
|
|
||||||
case 1001: // 离自身最近的目标
|
|
||||||
var control = BattleMgr.GetNearestUnit(Side);
|
|
||||||
if(ReferenceEquals(control, null))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
collider = GetSkillCollider(rangeType, collisionValue1, collisionValue2, x, z);
|
|
||||||
collider.InitBase();
|
|
||||||
collider.SetLockTarget(control);
|
|
||||||
collider.SetIsSearchByCollider(false);
|
|
||||||
if (!disposable)
|
|
||||||
{
|
|
||||||
colliderContainer = BattleMgr.PoolHelper.GetColliderContainer();
|
|
||||||
colliderContainer.InitBase();
|
|
||||||
colliderContainer.Add(collider);
|
|
||||||
colliderContainer.SetIsSearchByCollider(false);
|
|
||||||
}
|
|
||||||
collider.Search(aimSearchType, interval, duration, skillId, cloneIndex, skillEffectIndex, unlimitCount, delayAimTime, aimFollowTime, aimFollowSpeed, disposable);
|
|
||||||
collider.AddCheckTargetList(control.gameObject);
|
|
||||||
break;
|
|
||||||
case 1002: // 所有敌人
|
|
||||||
if (!disposable)
|
|
||||||
{
|
|
||||||
colliderContainer = BattleMgr.PoolHelper.GetColliderContainer();
|
|
||||||
colliderContainer.InitBase();
|
|
||||||
}
|
|
||||||
var unitsList = BattleMgr.GetUnitsList(Side);
|
|
||||||
for (int i = 0; i < unitsList.Count; i++)
|
|
||||||
{
|
|
||||||
collider = GetSkillCollider(rangeType, collisionValue1, collisionValue2, x, z);
|
|
||||||
collider.InitBase();
|
|
||||||
collider.SetLockTarget(unitsList[i]);
|
|
||||||
collider.SetIsSearchByCollider(false);
|
|
||||||
if (!disposable)
|
|
||||||
{
|
|
||||||
colliderContainer.Add(collider);
|
|
||||||
colliderContainer.SetIsSearchByCollider(false);
|
|
||||||
}
|
|
||||||
collider.Search(aimSearchType, interval, duration, skillId, cloneIndex, skillEffectIndex, unlimitCount, delayAimTime, aimFollowTime, aimFollowSpeed, disposable);
|
|
||||||
collider.AddCheckTargetList(unitsList[i].gameObject);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2001: // 离自身最近的目标所在的目标点
|
|
||||||
var control2 = BattleMgr.GetNearestUnit(Side);
|
|
||||||
if(ReferenceEquals(control2, null))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
collider = GetSkillCollider(rangeType, collisionValue1, collisionValue2, x, z);
|
|
||||||
collider.InitBase();
|
|
||||||
collider.SetTargetPosition(control2.transform.position);
|
|
||||||
collider.SetLockTarget(control2);
|
|
||||||
collider.SetIsSearchByCollider(true);
|
|
||||||
if (!disposable)
|
|
||||||
{
|
|
||||||
colliderContainer = BattleMgr.PoolHelper.GetColliderContainer();
|
|
||||||
colliderContainer.InitBase();
|
|
||||||
colliderContainer.Add(collider);
|
|
||||||
colliderContainer.SetIsSearchByCollider(true);
|
|
||||||
}
|
|
||||||
collider.Search(aimSearchType, interval, duration, skillId, cloneIndex, skillEffectIndex, unlimitCount, delayAimTime, aimFollowTime, aimFollowSpeed, disposable);
|
|
||||||
break;
|
|
||||||
case 2002: // 自身为原点,范围内的所有敌人
|
|
||||||
collider = GetSkillCollider(rangeType, collisionValue1, collisionValue2, x, z);
|
|
||||||
collider.InitBase();
|
|
||||||
collider.SetTargetPosition(transform.position);
|
|
||||||
collider.SetIsSearchByCollider(true);
|
|
||||||
if (!disposable)
|
|
||||||
{
|
|
||||||
colliderContainer = BattleMgr.PoolHelper.GetColliderContainer();
|
|
||||||
colliderContainer.InitBase();
|
|
||||||
colliderContainer.Add(collider);
|
|
||||||
colliderContainer.SetIsSearchByCollider(true);
|
|
||||||
}
|
|
||||||
collider.Search(aimSearchType, interval, duration, skillId, cloneIndex, skillEffectIndex, unlimitCount, delayAimTime, aimFollowTime, aimFollowSpeed, disposable);
|
|
||||||
break;
|
|
||||||
case 2003: // 自身为原点,且会跟随自身移动
|
|
||||||
collider = GetSkillCollider(rangeType, collisionValue1, collisionValue2, x, z);
|
|
||||||
collider.InitBase();
|
|
||||||
collider.SetTargetPosition(transform.position);
|
|
||||||
collider.SetLockTarget(this);
|
|
||||||
collider.SetIsSearchByCollider(true);
|
|
||||||
collider.SetUpdatePositionWithLockTarget(true);
|
|
||||||
if (!disposable)
|
|
||||||
{
|
|
||||||
colliderContainer = BattleMgr.PoolHelper.GetColliderContainer();
|
|
||||||
colliderContainer.InitBase();
|
|
||||||
colliderContainer.Add(collider);
|
|
||||||
colliderContainer.SetIsSearchByCollider(true);
|
|
||||||
}
|
|
||||||
collider.Search(aimSearchType, interval, duration, skillId, cloneIndex, skillEffectIndex, unlimitCount, delayAimTime, aimFollowTime, aimFollowSpeed, disposable);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return colliderContainer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnHitTarget(GameObject go, int skillId, int cloneIndex, int skillEffectIndex)
|
|
||||||
{
|
|
||||||
luaOnHitTargetFunc?.Invoke(skillId, cloneIndex, skillEffectIndex, go.GetInstanceID());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddLuaOnHitTargetFunc(Action<int, int, int, int> luaFunc)
|
|
||||||
{
|
|
||||||
luaOnHitTargetFunc = luaFunc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnFinishAIMove()
|
|
||||||
{
|
|
||||||
luaOnFinishAIMoveFunc?.Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddLuaOnFinishAIMoveFunc(Action luaFunc)
|
|
||||||
{
|
|
||||||
luaOnFinishAIMoveFunc = luaFunc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlBoxBullet SendBoxBullet(int skillId, int cloneIndex, int skillEffectIndex, int bulletType, int bulletFinishType, int bulletOriginType, int searchType, float w, float h, float duration, float speed, float offsetX, float offsetZ)
|
|
||||||
{
|
|
||||||
var bullet = BattleMgr.PoolHelper.GetBoxBullet();
|
|
||||||
if (ReferenceEquals(bullet, null))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
bullet.SetAdmin(this);
|
|
||||||
bullet.InitBoxBullet(skillId, cloneIndex, skillEffectIndex, bulletType, bulletFinishType, bulletOriginType, searchType, w, h, duration, speed, offsetX, offsetZ);
|
|
||||||
return bullet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattleControlSphereBullet SendSphereBullet(int skillId, int cloneIndex, int skillEffectIndex, int bulletType, int bulletFinishType, int bulletOriginType, int searchType, float radius, float duration, float speed, float offsetX, float offsetZ)
|
|
||||||
{
|
|
||||||
var bullet = BattleMgr.PoolHelper.GetSphereBullet();
|
|
||||||
if (ReferenceEquals(bullet, null))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
bullet.SetAdmin(this);
|
|
||||||
bullet.InitSphereBullet(skillId, cloneIndex, skillEffectIndex, bulletType, bulletFinishType, bulletOriginType, searchType, radius, duration, speed, offsetX, offsetZ);
|
|
||||||
return bullet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitShadow()
|
|
||||||
{
|
|
||||||
if (IsHaveShadow)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
IsHaveShadow = true;
|
|
||||||
shadow = BattleMgr.PoolHelper.GetShadow();
|
|
||||||
shadow.transform.SetParent(transform, false);
|
|
||||||
shadow.transform.localPosition = Vector3.zero;
|
|
||||||
shadow.transform.localScale = Vector3.one*BodyRadius*2.0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 483fd45f8b1c3004e8a737ccde31e420
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,275 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlWarning : MonoBehaviour
|
|
||||||
{
|
|
||||||
protected int uniqueId;
|
|
||||||
protected BattleControlUnit owner;
|
|
||||||
protected BattleControlUnit target;
|
|
||||||
protected int warningType; // 预警形状
|
|
||||||
protected Vector2 warningStartDeflection; // 预警起点偏移
|
|
||||||
protected Vector2 warningEndDeflection; // 预警终点偏移
|
|
||||||
protected Vector2 warningRange; // 预警范围
|
|
||||||
protected float warningRadius; // 预警范围
|
|
||||||
protected float warningDelayTime; // 预警延迟时间
|
|
||||||
protected float warningDuration; // 预警时间
|
|
||||||
protected float warningTime; // 用于倒计时的预警时间
|
|
||||||
protected int warningTargetType; // 预警目标类型
|
|
||||||
protected BattleControlCollider followCollider; // 如果为追踪形预警,追踪的对象
|
|
||||||
protected Action<int> luaOnBattleEventFunc;
|
|
||||||
|
|
||||||
public SpriteRenderer outSp;
|
|
||||||
public SpriteRenderer inSp;
|
|
||||||
public BattleControlWarningCollider controlCollider;
|
|
||||||
|
|
||||||
protected bool IsEnable = false;
|
|
||||||
protected bool IsRecycle = false;
|
|
||||||
protected int followColliderUniqueId = 0;
|
|
||||||
|
|
||||||
public int GetUniqueId()
|
|
||||||
{
|
|
||||||
return uniqueId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool GetIsEnable()
|
|
||||||
{
|
|
||||||
return IsEnable;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool GetIsRecycle()
|
|
||||||
{
|
|
||||||
return IsRecycle;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitOwnerAndTarget(BattleControlUnit owner, BattleControlUnit target, int uniqueId)
|
|
||||||
{
|
|
||||||
this.owner = owner;
|
|
||||||
this.target = target;
|
|
||||||
this.uniqueId = uniqueId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitCircleWarning(int warningType, float deflectionX, float deflectionZ, float warningRadius, float warningDelayTime, float warningDuration, int warningTargetType)
|
|
||||||
{
|
|
||||||
this.warningType = warningType;
|
|
||||||
this.warningStartDeflection = new Vector2(deflectionX, deflectionZ);
|
|
||||||
this.warningEndDeflection = Vector2.zero;
|
|
||||||
this.warningRange = Vector2.zero;
|
|
||||||
this.warningRadius = warningRadius;
|
|
||||||
this.warningDelayTime = warningDelayTime;
|
|
||||||
this.warningDuration = warningDuration;
|
|
||||||
this.warningTargetType = warningTargetType;
|
|
||||||
this.followCollider = null;
|
|
||||||
this.followColliderUniqueId = 0;
|
|
||||||
|
|
||||||
this.warningTime = warningDelayTime + warningDuration;
|
|
||||||
|
|
||||||
InitBase();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitRectWarning(int warningType, float startDeflectionX, float startDeflectionZ, float endDeflectionX, float endDeflectionZ, float warningRectX, float warningRectY, float warningDelayTime, float warningDuration, int warningTargetType)
|
|
||||||
{
|
|
||||||
this.warningType = warningType;
|
|
||||||
this.warningStartDeflection = new Vector2(startDeflectionX, startDeflectionZ);
|
|
||||||
this.warningEndDeflection = new Vector2(endDeflectionX, endDeflectionZ);
|
|
||||||
this.warningRange = new Vector2(warningRectX, warningRectY);
|
|
||||||
this.warningRadius = 0;
|
|
||||||
this.warningDelayTime = warningDelayTime;
|
|
||||||
this.warningDuration = warningDuration;
|
|
||||||
this.warningTargetType = warningTargetType;
|
|
||||||
this.followCollider = null;
|
|
||||||
this.followColliderUniqueId = 0;
|
|
||||||
|
|
||||||
this.warningTime = warningDelayTime + warningDuration;
|
|
||||||
|
|
||||||
InitBase();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitFollowColliderWarning(int warningType, float deflectionX, float deflectionZ, float warningRadius, float warningDelayTime, float warningDuration, BattleControlCollider collider)
|
|
||||||
{
|
|
||||||
this.warningType = warningType;
|
|
||||||
this.warningStartDeflection = new Vector2(deflectionX, deflectionZ);
|
|
||||||
this.warningEndDeflection = Vector2.zero;
|
|
||||||
this.warningRange = Vector2.zero;
|
|
||||||
this.warningRadius = warningRadius;
|
|
||||||
this.warningDelayTime = warningDelayTime;
|
|
||||||
this.warningDuration = warningDuration;
|
|
||||||
this.warningTargetType = 4;
|
|
||||||
this.followCollider = collider;
|
|
||||||
this.followColliderUniqueId = collider.GetUniqueId();
|
|
||||||
|
|
||||||
this.warningTime = warningDelayTime + warningDuration;
|
|
||||||
|
|
||||||
InitBase();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void InitBase()
|
|
||||||
{
|
|
||||||
IsEnable = true;
|
|
||||||
IsRecycle = false;
|
|
||||||
|
|
||||||
var beginPos = Vector3.zero;
|
|
||||||
var anglesZ = 0f;
|
|
||||||
var outPos = Vector3.zero;
|
|
||||||
var outRect = Vector2.zero;
|
|
||||||
// 更新初始数据
|
|
||||||
if (warningTargetType == 1) // 目标为Hero
|
|
||||||
{
|
|
||||||
if (warningType == 1) // 矩形
|
|
||||||
{
|
|
||||||
beginPos = owner.transform.position + new Vector3(warningStartDeflection.x, 0, warningStartDeflection.y);
|
|
||||||
var targetPos = target.transform.position;
|
|
||||||
var diffPos = targetPos - beginPos;
|
|
||||||
anglesZ = Vector2.Angle(Vector2.right, new Vector2(diffPos.x, diffPos.z));
|
|
||||||
if (targetPos.z < beginPos.z)
|
|
||||||
{
|
|
||||||
anglesZ = -anglesZ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // 圆形
|
|
||||||
{
|
|
||||||
beginPos = target.transform.position + new Vector3(warningStartDeflection.x, 0, warningStartDeflection.y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (warningTargetType == 2) // 目标为自身
|
|
||||||
{
|
|
||||||
beginPos = owner.transform.position + new Vector3(warningStartDeflection.x, 0, warningStartDeflection.y);
|
|
||||||
anglesZ = owner.Direction == 1 ? 0f : 180f;
|
|
||||||
}
|
|
||||||
else if (warningTargetType == 3) // 目标为场景
|
|
||||||
{
|
|
||||||
beginPos = new Vector3(warningStartDeflection.x, 0, warningStartDeflection.y);
|
|
||||||
anglesZ = Vector2.Angle(Vector2.right, warningStartDeflection - warningEndDeflection);
|
|
||||||
if (warningEndDeflection.y < warningStartDeflection.y)
|
|
||||||
{
|
|
||||||
anglesZ = -anglesZ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (warningTargetType == 4) // 目标为子弹
|
|
||||||
{
|
|
||||||
if (!ReferenceEquals(followCollider, null))
|
|
||||||
{
|
|
||||||
beginPos = followCollider.transform.position;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (warningType == 1) // 矩形
|
|
||||||
{
|
|
||||||
outPos = new Vector3(warningRange.x / 2, 0, 0);
|
|
||||||
outRect = warningRange;
|
|
||||||
}
|
|
||||||
else if (warningType == 2) // 圆形
|
|
||||||
{
|
|
||||||
outPos = Vector3.zero;
|
|
||||||
outRect = new Vector2(warningRadius, warningRadius);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置初始位置,朝向,大小
|
|
||||||
transform.position = beginPos;
|
|
||||||
transform.eulerAngles = new Vector3(90, 0, anglesZ);
|
|
||||||
|
|
||||||
outSp.transform.localPosition = outPos;
|
|
||||||
outSp.size = outRect;
|
|
||||||
inSp.transform.localPosition = outPos + new Vector3(0, 0.01f, 0);
|
|
||||||
// 初始先隐藏
|
|
||||||
inSp.enabled = false;
|
|
||||||
outSp.enabled = false;
|
|
||||||
|
|
||||||
//初始化collider
|
|
||||||
controlCollider.InitWarningType(this, warningType);
|
|
||||||
if (warningType == 1)
|
|
||||||
{
|
|
||||||
controlCollider.boxCollider.center = outPos;
|
|
||||||
controlCollider.boxCollider.size = outRect;
|
|
||||||
}
|
|
||||||
else if (warningType == 2)
|
|
||||||
{
|
|
||||||
controlCollider.sphereCollider.center = Vector3.zero;
|
|
||||||
controlCollider.sphereCollider.radius = warningRadius / 2;
|
|
||||||
}
|
|
||||||
controlCollider.SetColliderDisable();
|
|
||||||
BFMain.Instance.BattleMgr.RemoveEffectWarning(GetUniqueId());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Update()
|
|
||||||
{
|
|
||||||
if (IsEnable)
|
|
||||||
{
|
|
||||||
warningTime -= Time.deltaTime * BattleConfigure.TimeScale;
|
|
||||||
if (warningTime < 0.0f)
|
|
||||||
{
|
|
||||||
Recycle();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 表现逻辑
|
|
||||||
if ((warningDuration < warningTime) && warningTime < (warningDelayTime + warningDuration)) // 延迟生效
|
|
||||||
{
|
|
||||||
//隐藏
|
|
||||||
inSp.enabled = false;
|
|
||||||
outSp.enabled = false;
|
|
||||||
}
|
|
||||||
else if ((0 < warningTime) && (warningTime < warningDuration)) // 正常缩放表现
|
|
||||||
{
|
|
||||||
inSp.enabled = true;
|
|
||||||
outSp.enabled = true;
|
|
||||||
|
|
||||||
var rate = 1 - warningTime / warningDuration;
|
|
||||||
rate = UnityEngine.Mathf.Clamp(rate, 0, 1);
|
|
||||||
if (warningType == 1) // 矩形
|
|
||||||
{
|
|
||||||
inSp.transform.localPosition = new Vector3(rate * warningRange.x / 2, 0, -0.01f);
|
|
||||||
inSp.size = new Vector2(rate * warningRange.x, warningRange.y);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
inSp.size = new Vector2(rate * warningRadius, rate * warningRadius);
|
|
||||||
}
|
|
||||||
|
|
||||||
//设置Collider 有效
|
|
||||||
controlCollider.SetColliderEnable();
|
|
||||||
BFMain.Instance.BattleMgr.AddEffectWarning(GetUniqueId());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (warningTargetType == 4) // 跟踪子弹
|
|
||||||
{
|
|
||||||
if (!ReferenceEquals(followCollider, null))
|
|
||||||
{
|
|
||||||
this.transform.position = followCollider.transform.position;
|
|
||||||
}
|
|
||||||
if (followCollider.GetUniqueId() != followColliderUniqueId)
|
|
||||||
{
|
|
||||||
Recycle();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Recycle()
|
|
||||||
{
|
|
||||||
OnBattleEvent(1); // 回调Lua触发回收
|
|
||||||
IsEnable = false;
|
|
||||||
IsRecycle = true;
|
|
||||||
this.controlCollider.SetColliderDisable();
|
|
||||||
this.owner = null;
|
|
||||||
this.target = null;
|
|
||||||
|
|
||||||
luaOnBattleEventFunc = null;
|
|
||||||
|
|
||||||
BFMain.Instance.BattleMgr.RemoveEffectHeroWarning(uniqueId);
|
|
||||||
BFMain.Instance.BattleMgr.RemoveEffectWarning(GetUniqueId());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddLuaOnBattleEvent(Action<int> luaFunc)
|
|
||||||
{
|
|
||||||
luaOnBattleEventFunc = luaFunc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnBattleEvent(int eventType)
|
|
||||||
{
|
|
||||||
luaOnBattleEventFunc?.Invoke(eventType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: cf5947fe6947fda43b578d8a7c805de8
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,85 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleControlWarningCollider : MonoBehaviour
|
|
||||||
{
|
|
||||||
public BattleControlWarning parentWarning;
|
|
||||||
public BoxCollider boxCollider;
|
|
||||||
public SphereCollider sphereCollider;
|
|
||||||
protected int warningType; // 预警形状
|
|
||||||
protected bool colliderEnable; // 是否有效
|
|
||||||
|
|
||||||
public void InitWarningType(BattleControlWarning parentWarning, int warningType)
|
|
||||||
{
|
|
||||||
this.parentWarning = parentWarning;
|
|
||||||
this.warningType = warningType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetColliderEnable()
|
|
||||||
{
|
|
||||||
colliderEnable = true;
|
|
||||||
|
|
||||||
if (warningType == 1)
|
|
||||||
{
|
|
||||||
if (!ReferenceEquals(boxCollider, null))
|
|
||||||
{
|
|
||||||
boxCollider.enabled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (warningType == 2)
|
|
||||||
{
|
|
||||||
if (!ReferenceEquals(sphereCollider, null))
|
|
||||||
{
|
|
||||||
sphereCollider.enabled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetColliderDisable()
|
|
||||||
{
|
|
||||||
colliderEnable = false;
|
|
||||||
|
|
||||||
if (warningType == 1)
|
|
||||||
{
|
|
||||||
if (!ReferenceEquals(boxCollider, null))
|
|
||||||
{
|
|
||||||
boxCollider.enabled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (warningType == 2)
|
|
||||||
{
|
|
||||||
if (!ReferenceEquals(sphereCollider, null))
|
|
||||||
{
|
|
||||||
sphereCollider.enabled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
|
||||||
{
|
|
||||||
// if (!ReferenceEquals(parentWarning, null) && parentWarning.GetIsEnable() && !parentWarning.GetIsRecycle() && colliderEnable)
|
|
||||||
{
|
|
||||||
BFMain.Instance.BattleMgr.AddEffectHeroWarning(parentWarning.GetUniqueId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnTriggerStay(Collider other)
|
|
||||||
{
|
|
||||||
// if (!ReferenceEquals(parentWarning, null) && parentWarning.GetIsEnable() && !parentWarning.GetIsRecycle() && colliderEnable)
|
|
||||||
{
|
|
||||||
BFMain.Instance.BattleMgr.AddEffectHeroWarning(parentWarning.GetUniqueId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnTriggerExit(Collider other)
|
|
||||||
{
|
|
||||||
// if (!ReferenceEquals(parentWarning, null) && parentWarning.GetIsEnable() && !parentWarning.GetIsRecycle() && colliderEnable)
|
|
||||||
{
|
|
||||||
BFMain.Instance.BattleMgr.RemoveEffectHeroWarning(parentWarning.GetUniqueId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b91f953e887f9e44aa8510eadb63cf19
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,86 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleEffectNumber : MonoBehaviour
|
|
||||||
{
|
|
||||||
public Animator animator;
|
|
||||||
public TMPro.TextMeshProUGUI effectText;
|
|
||||||
private const string CritString = "c";
|
|
||||||
private float putbackTime = 0;
|
|
||||||
private bool isPause = false;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public int ColorType = 0;
|
|
||||||
private void Update()
|
|
||||||
{
|
|
||||||
if (isPause)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
putbackTime -= Time.deltaTime;
|
|
||||||
if (putbackTime <= 0.0f)
|
|
||||||
{
|
|
||||||
effectText.text = string.Empty;
|
|
||||||
BFMain.Instance.BattleMgr.PoolHelper.PutBackEffectText(this, ColorType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowEffectNumber(int effectType, string effectNumber)
|
|
||||||
{
|
|
||||||
putbackTime = BattleTMPNumber.PUT_BACK_TIME;
|
|
||||||
|
|
||||||
switch (effectType)
|
|
||||||
{
|
|
||||||
case BattleConst.EFFECT_TYPE_MOVE_L:
|
|
||||||
effectText.text = effectNumber;
|
|
||||||
animator.Play(BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_L, -1, 0);
|
|
||||||
break;
|
|
||||||
case BattleConst.EFFECT_TYPE_MOVE_R:
|
|
||||||
effectText.text = effectNumber;
|
|
||||||
animator.Play(BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_R, -1, 0);
|
|
||||||
break;
|
|
||||||
case BattleConst.EFFECT_TYPE_MOVE_L_2:
|
|
||||||
effectText.text = effectNumber;
|
|
||||||
animator.Play(BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_L_2, -1, 0);
|
|
||||||
break;
|
|
||||||
case BattleConst.EFFECT_TYPE_MOVE_R_2:
|
|
||||||
effectText.text = effectNumber;
|
|
||||||
animator.Play(BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_R_2, -1, 0);
|
|
||||||
break;
|
|
||||||
case BattleConst.EFFECT_TYPE_CRIT:
|
|
||||||
effectText.text = effectNumber;
|
|
||||||
animator.Play(BattleConst.ANIMATOR_HASH_NAME_NUMBER_CRIT, -1, 0);
|
|
||||||
break;
|
|
||||||
case BattleConst.EFFECT_TYPE_BUFF:
|
|
||||||
effectText.text = effectNumber;
|
|
||||||
animator.Play(BattleConst.ANIMATOR_HASH_NAME_NUMBER_BUFF, -1, 0);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
effectText.text = effectNumber;
|
|
||||||
animator.Play(BattleConst.ANIMATOR_HASH_NAME_NUMBER_BUFF, -1, 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetEnabled(bool enabled)
|
|
||||||
{
|
|
||||||
animator.enabled = enabled;
|
|
||||||
this.enabled = enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetPause()
|
|
||||||
{
|
|
||||||
isPause = true;
|
|
||||||
animator.speed = 0.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetResume()
|
|
||||||
{
|
|
||||||
isPause = false;
|
|
||||||
animator.speed = 1.0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 6dfcbbe18fdd3fb4ea08e5a5d27cd1c9
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleHpBar : MonoBehaviour
|
|
||||||
{
|
|
||||||
public BFSlider Slider;
|
|
||||||
public GameObject ShieldBg;
|
|
||||||
public BFSlider ShieldSlider;
|
|
||||||
private bool shieldVisible = false;
|
|
||||||
|
|
||||||
public void RefreshHpBar(float percent)
|
|
||||||
{
|
|
||||||
Slider.value = percent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetShieldVisible(bool visible)
|
|
||||||
{
|
|
||||||
if (shieldVisible == visible)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
shieldVisible = visible;
|
|
||||||
if (visible)
|
|
||||||
{
|
|
||||||
ShieldBg.transform.localScale = Vector3.one;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShieldBg.transform.localScale = Vector3.zero;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RefreshShieldBar(float percent)
|
|
||||||
{
|
|
||||||
ShieldSlider.value = percent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 4d6cedf39a26361419fc072a7b763ba7
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,69 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleRewardIconHelper : MonoBehaviour
|
|
||||||
{
|
|
||||||
public SpriteRenderer skillBgSprite;
|
|
||||||
public SpriteRenderer itemBgSprite;
|
|
||||||
public SpriteRenderer iconSprite;
|
|
||||||
private bool initSucc = false;
|
|
||||||
|
|
||||||
void Awake()
|
|
||||||
{
|
|
||||||
if (ReferenceEquals(skillBgSprite, null))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(itemBgSprite, null))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (ReferenceEquals(iconSprite, null))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
initSucc = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowSkill(Sprite sprite)
|
|
||||||
{
|
|
||||||
if (!initSucc)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
skillBgSprite.color = Color.white;
|
|
||||||
itemBgSprite.color = Color.clear;
|
|
||||||
iconSprite.sprite = sprite;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Sprite GetSprite()
|
|
||||||
{
|
|
||||||
return iconSprite.sprite;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowItem(Sprite sprite)
|
|
||||||
{
|
|
||||||
if (!initSucc)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
skillBgSprite.color = Color.clear;
|
|
||||||
itemBgSprite.color = Color.white;
|
|
||||||
iconSprite.sprite = sprite;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetOder(int order)
|
|
||||||
{
|
|
||||||
if (!initSucc)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
skillBgSprite.sortingOrder = order;
|
|
||||||
itemBgSprite.sortingOrder = order;
|
|
||||||
iconSprite.sortingOrder = order + 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 084bbcf855fd07f4e91b7089fdefe07e
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,99 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace BF
|
|
||||||
{
|
|
||||||
public class BattleSkillToast : MonoBehaviour
|
|
||||||
{
|
|
||||||
static int NORMAL_ADD_WIDTH = 60;
|
|
||||||
static int LEGACY_ADD_WIDTH = 20;
|
|
||||||
|
|
||||||
public Animator animator;
|
|
||||||
public Transform normalBg;
|
|
||||||
public Atlas skillAtlas;
|
|
||||||
public Image skillIcon;
|
|
||||||
public TMPro.TextMeshProUGUI normalText;
|
|
||||||
|
|
||||||
public Transform legacyBg;
|
|
||||||
public Atlas legacyAtlas;
|
|
||||||
public Image legacyQltIcon;
|
|
||||||
public Image legacyIcon;
|
|
||||||
public TMPro.TextMeshProUGUI legacyText;
|
|
||||||
|
|
||||||
private float putbackTime = 0;
|
|
||||||
private bool isPause = false;
|
|
||||||
[System.NonSerialized]
|
|
||||||
public int ColorType = 0;
|
|
||||||
private void Update()
|
|
||||||
{
|
|
||||||
if (isPause)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
putbackTime -= Time.deltaTime;
|
|
||||||
if (putbackTime <= 0.0f)
|
|
||||||
{
|
|
||||||
BFMain.Instance.BattleMgr.PoolHelper.PutBackSkillToast(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowNormalSkillToast(string spriteName, string desc)
|
|
||||||
{
|
|
||||||
putbackTime = 2;//BattleTMPNumber.PUT_BACK_TIME; // TODOJ
|
|
||||||
|
|
||||||
normalBg.transform.localScale = Vector3.one;
|
|
||||||
legacyBg.transform.localScale = Vector3.zero;
|
|
||||||
|
|
||||||
var hashName = Utils.BKDRHash(spriteName);
|
|
||||||
skillIcon.sprite = skillAtlas.GetSprite(hashName);
|
|
||||||
normalText.text = desc;
|
|
||||||
|
|
||||||
var preferredWidth = normalText.preferredWidth;
|
|
||||||
normalText.rectTransform.sizeDelta = new Vector2(preferredWidth, normalText.rectTransform.sizeDelta.y);
|
|
||||||
normalBg.GetComponent<RectTransform>().sizeDelta = new Vector2(preferredWidth + NORMAL_ADD_WIDTH, normalBg.GetComponent<RectTransform>().sizeDelta.y);
|
|
||||||
|
|
||||||
animator.Play(BattleConst.ANIMATOR_HAS_NAME_SKILL_TOAST, -1, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowLegacySkillToast(string qltName, string iconName, string desc)
|
|
||||||
{
|
|
||||||
putbackTime = 2;//BattleTMPNumber.PUT_BACK_TIME; // TODOJ
|
|
||||||
|
|
||||||
normalBg.transform.localScale = Vector3.zero;
|
|
||||||
legacyBg.transform.localScale = Vector3.one;
|
|
||||||
|
|
||||||
var qltHashName = Utils.BKDRHash(qltName);
|
|
||||||
var iconHashName = Utils.BKDRHash(iconName);
|
|
||||||
|
|
||||||
legacyQltIcon.sprite = skillAtlas.GetSprite(qltHashName);
|
|
||||||
legacyIcon.sprite = legacyAtlas.GetSprite(iconHashName);
|
|
||||||
legacyText.text = desc;
|
|
||||||
|
|
||||||
var preferredWidth = legacyText.preferredWidth;
|
|
||||||
legacyText.rectTransform.sizeDelta = new Vector2(preferredWidth, legacyText.rectTransform.sizeDelta.y);
|
|
||||||
legacyBg.GetComponent<RectTransform>().sizeDelta = new Vector2(preferredWidth + LEGACY_ADD_WIDTH, legacyBg.GetComponent<RectTransform>().sizeDelta.y);
|
|
||||||
|
|
||||||
animator.Play(BattleConst.ANIMATOR_HAS_NAME_SKILL_TOAST, -1, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetEnabled(bool enabled)
|
|
||||||
{
|
|
||||||
// animator.enabled = enabled;
|
|
||||||
this.enabled = enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetPause()
|
|
||||||
{
|
|
||||||
isPause = true;
|
|
||||||
animator.speed = 0.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetResume()
|
|
||||||
{
|
|
||||||
isPause = false;
|
|
||||||
animator.speed = 1.0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 627f567ae88eefd4291161b09c9d8acd
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -21,7 +21,7 @@ namespace XLua.CSObjectWrap
|
|||||||
{
|
{
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||||
System.Type type = typeof(BF.BFMain);
|
System.Type type = typeof(BF.BFMain);
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 2, 16, 0);
|
Utils.BeginObjectRegister(type, L, translator, 0, 2, 14, 0);
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StartGame", _m_StartGame);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StartGame", _m_StartGame);
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Destroy", _m_Destroy);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Destroy", _m_Destroy);
|
||||||
@ -38,11 +38,9 @@ namespace XLua.CSObjectWrap
|
|||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "WebRequestMgr", _g_get_WebRequestMgr);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "WebRequestMgr", _g_get_WebRequestMgr);
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "OneShotManager", _g_get_OneShotManager);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "OneShotManager", _g_get_OneShotManager);
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "SoundManager", _g_get_SoundManager);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "SoundManager", _g_get_SoundManager);
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "TimeLineManager", _g_get_TimeLineManager);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "TaskMgr", _g_get_TaskMgr);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "TaskMgr", _g_get_TaskMgr);
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "BIReport", _g_get_BIReport);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "BIReport", _g_get_BIReport);
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "SDKMgr", _g_get_SDKMgr);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "SDKMgr", _g_get_SDKMgr);
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "BattleMgr", _g_get_BattleMgr);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -364,20 +362,6 @@ namespace XLua.CSObjectWrap
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_TimeLineManager(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BFMain gen_to_be_invoked = (BF.BFMain)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.TimeLineManager);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
static int _g_get_TaskMgr(RealStatePtr L)
|
static int _g_get_TaskMgr(RealStatePtr L)
|
||||||
{
|
{
|
||||||
@ -420,20 +404,6 @@ namespace XLua.CSObjectWrap
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_BattleMgr(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BFMain gen_to_be_invoked = (BF.BFMain)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.BattleMgr);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
static int _g_get_IsStandAlone(RealStatePtr L)
|
static int _g_get_IsStandAlone(RealStatePtr L)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,769 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleConfigureWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleConfigure);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 26, 26);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "TimeScale", _g_get_TimeScale);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "NormalMoveTime", _g_get_NormalMoveTime);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "NormalBackTime", _g_get_NormalBackTime);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "CameraMinX", _g_get_CameraMinX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "CameraMaxX", _g_get_CameraMaxX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "SceneMinX", _g_get_SceneMinX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "SceneMaxX", _g_get_SceneMaxX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "SceneMinZ", _g_get_SceneMinZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "SceneMaxZ", _g_get_SceneMaxZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "DistanceAttack", _g_get_DistanceAttack);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "DistanceDash", _g_get_DistanceDash);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "DistanceBack", _g_get_DistanceBack);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "BattleCenterPosX", _g_get_BattleCenterPosX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "WorldToScreenWidth", _g_get_WorldToScreenWidth);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "CheckMonsterTowardInterval", _g_get_CheckMonsterTowardInterval);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "CheckAITargetPositionInterval", _g_get_CheckAITargetPositionInterval);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "MonsterScaleFactorXZ", _g_get_MonsterScaleFactorXZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "SceneMidX", _g_get_SceneMidX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "SceneMidZ", _g_get_SceneMidZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "DistanceHitBack", _g_get_DistanceHitBack);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "DistanceHitFly", _g_get_DistanceHitFly);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "HeightHitFly", _g_get_HeightHitFly);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "TimeHitFly", _g_get_TimeHitFly);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "TimeLie", _g_get_TimeLie);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "HitBackTime", _g_get_HitBackTime);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "HitBackSpeed", _g_get_HitBackSpeed);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "TimeScale", _s_set_TimeScale);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "NormalMoveTime", _s_set_NormalMoveTime);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "NormalBackTime", _s_set_NormalBackTime);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "CameraMinX", _s_set_CameraMinX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "CameraMaxX", _s_set_CameraMaxX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "SceneMinX", _s_set_SceneMinX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "SceneMaxX", _s_set_SceneMaxX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "SceneMinZ", _s_set_SceneMinZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "SceneMaxZ", _s_set_SceneMaxZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "DistanceAttack", _s_set_DistanceAttack);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "DistanceDash", _s_set_DistanceDash);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "DistanceBack", _s_set_DistanceBack);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "BattleCenterPosX", _s_set_BattleCenterPosX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "WorldToScreenWidth", _s_set_WorldToScreenWidth);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "CheckMonsterTowardInterval", _s_set_CheckMonsterTowardInterval);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "CheckAITargetPositionInterval", _s_set_CheckAITargetPositionInterval);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "MonsterScaleFactorXZ", _s_set_MonsterScaleFactorXZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "SceneMidX", _s_set_SceneMidX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "SceneMidZ", _s_set_SceneMidZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "DistanceHitBack", _s_set_DistanceHitBack);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "DistanceHitFly", _s_set_DistanceHitFly);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "HeightHitFly", _s_set_HeightHitFly);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "TimeHitFly", _s_set_TimeHitFly);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "TimeLie", _s_set_TimeLie);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "HitBackTime", _s_set_HitBackTime);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "HitBackSpeed", _s_set_HitBackSpeed);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
return LuaAPI.luaL_error(L, "BF.BattleConfigure does not have a constructor!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_TimeScale(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.TimeScale);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_NormalMoveTime(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.NormalMoveTime);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_NormalBackTime(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.NormalBackTime);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_CameraMinX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.CameraMinX);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_CameraMaxX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.CameraMaxX);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_SceneMinX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.SceneMinX);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_SceneMaxX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.SceneMaxX);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_SceneMinZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.SceneMinZ);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_SceneMaxZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.SceneMaxZ);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_DistanceAttack(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.DistanceAttack);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_DistanceDash(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.DistanceDash);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_DistanceBack(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.DistanceBack);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_BattleCenterPosX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.BattleCenterPosX);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_WorldToScreenWidth(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.WorldToScreenWidth);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_CheckMonsterTowardInterval(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.CheckMonsterTowardInterval);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_CheckAITargetPositionInterval(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.CheckAITargetPositionInterval);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_MonsterScaleFactorXZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.MonsterScaleFactorXZ);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_SceneMidX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.SceneMidX);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_SceneMidZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.SceneMidZ);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_DistanceHitBack(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.DistanceHitBack);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_DistanceHitFly(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.DistanceHitFly);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_HeightHitFly(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.HeightHitFly);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_TimeHitFly(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.TimeHitFly);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_TimeLie(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.TimeLie);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_HitBackTime(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.HitBackTime);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_HitBackSpeed(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushnumber(L, BF.BattleConfigure.HitBackSpeed);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_TimeScale(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.TimeScale = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_NormalMoveTime(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.NormalMoveTime = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_NormalBackTime(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.NormalBackTime = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_CameraMinX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.CameraMinX = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_CameraMaxX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.CameraMaxX = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_SceneMinX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.SceneMinX = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_SceneMaxX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.SceneMaxX = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_SceneMinZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.SceneMinZ = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_SceneMaxZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.SceneMaxZ = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_DistanceAttack(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.DistanceAttack = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_DistanceDash(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.DistanceDash = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_DistanceBack(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.DistanceBack = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_BattleCenterPosX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.BattleCenterPosX = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_WorldToScreenWidth(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.WorldToScreenWidth = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_CheckMonsterTowardInterval(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.CheckMonsterTowardInterval = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_CheckAITargetPositionInterval(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.CheckAITargetPositionInterval = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_MonsterScaleFactorXZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.MonsterScaleFactorXZ = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_SceneMidX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.SceneMidX = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_SceneMidZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.SceneMidZ = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_DistanceHitBack(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.DistanceHitBack = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_DistanceHitFly(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.DistanceHitFly = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_HeightHitFly(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.HeightHitFly = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_TimeHitFly(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.TimeHitFly = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_TimeLie(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.TimeLie = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_HitBackTime(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.HitBackTime = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_HitBackSpeed(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConfigure.HitBackSpeed = (float)LuaAPI.lua_tonumber(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,630 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleConstWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleConst);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 48, 19, 19);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SIDE_ATK", BF.BattleConst.SIDE_ATK);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SIDE_DEF", BF.BattleConst.SIDE_DEF);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DOTWEEN_ID_BATTLE", BF.BattleConst.DOTWEEN_ID_BATTLE);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BATTLE_POOL_NAME", BF.BattleConst.BATTLE_POOL_NAME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BATTLE_ROOT_NAME", BF.BattleConst.BATTLE_ROOT_NAME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BATTLE_BOX_COLLIDER_NAME", BF.BattleConst.BATTLE_BOX_COLLIDER_NAME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BATTLE_SPHERE_COLLIDER_NAME", BF.BattleConst.BATTLE_SPHERE_COLLIDER_NAME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BATTLE_SPHERE_BULLET_NAME", BF.BattleConst.BATTLE_SPHERE_BULLET_NAME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BATTLE_BOX_BULLET_NAME", BF.BattleConst.BATTLE_BOX_BULLET_NAME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BATTLE_AIM_NAME", BF.BattleConst.BATTLE_AIM_NAME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DEFAULT_FACTOR", BF.BattleConst.DEFAULT_FACTOR);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DEFAULT_FACTOR_FLOAT", BF.BattleConst.DEFAULT_FACTOR_FLOAT);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DEFAULT_FACTOR_DOUBLE", BF.BattleConst.DEFAULT_FACTOR_DOUBLE);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CircleRadians", BF.BattleConst.CircleRadians);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "NegativeCircleRadians", BF.BattleConst.NegativeCircleRadians);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DelayRecycle", BF.BattleConst.DelayRecycle);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DeadMoveSpeed", BF.BattleConst.DeadMoveSpeed);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DeadMoveDistance", BF.BattleConst.DeadMoveDistance);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SPRITE_CHARACTER_SHADER_NAME", BF.BattleConst.SPRITE_CHARACTER_SHADER_NAME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MODEL_CHARACTER_SHADER_NAME", BF.BattleConst.MODEL_CHARACTER_SHADER_NAME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UNIT_MOVE_DISTANCE", BF.BattleConst.UNIT_MOVE_DISTANCE);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UNIT_MOVE_DISTANCE_OPPOSITE", BF.BattleConst.UNIT_MOVE_DISTANCE_OPPOSITE);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ITEM_QUICK_MOVE_SPEED", BF.BattleConst.ITEM_QUICK_MOVE_SPEED);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ITEM_QUICK_MOVE_TIME", BF.BattleConst.ITEM_QUICK_MOVE_TIME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EXP_ITEM_MOVE_SPEED", BF.BattleConst.EXP_ITEM_MOVE_SPEED);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EXP_ITEM_MOVE_TIME", BF.BattleConst.EXP_ITEM_MOVE_TIME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CHECK_DIRECTION_TIME", BF.BattleConst.CHECK_DIRECTION_TIME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "RADIANS_10", BF.BattleConst.RADIANS_10);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "RADIANS_180", BF.BattleConst.RADIANS_180);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "RADIANS_NEGATIVE_180", BF.BattleConst.RADIANS_NEGATIVE_180);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "RADIANS_360", BF.BattleConst.RADIANS_360);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EFFECT_TYPE_MOVE_L", BF.BattleConst.EFFECT_TYPE_MOVE_L);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EFFECT_TYPE_MOVE_R", BF.BattleConst.EFFECT_TYPE_MOVE_R);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EFFECT_TYPE_MOVE_L_2", BF.BattleConst.EFFECT_TYPE_MOVE_L_2);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EFFECT_TYPE_MOVE_R_2", BF.BattleConst.EFFECT_TYPE_MOVE_R_2);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EFFECT_TYPE_CRIT", BF.BattleConst.EFFECT_TYPE_CRIT);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EFFECT_TYPE_BUFF", BF.BattleConst.EFFECT_TYPE_BUFF);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SFX_DJGX_01", BF.BattleConst.SFX_DJGX_01);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SFX_BXGZ_01", BF.BattleConst.SFX_BXGZ_01);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ANIMATOR_HASH_NAME_NUMBER_MOVE_L", BF.BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_L);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ANIMATOR_HASH_NAME_NUMBER_MOVE_R", BF.BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_R);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ANIMATOR_HASH_NAME_NUMBER_BUFF", BF.BattleConst.ANIMATOR_HASH_NAME_NUMBER_BUFF);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ANIMATOR_HASH_NAME_NUMBER_CRIT", BF.BattleConst.ANIMATOR_HASH_NAME_NUMBER_CRIT);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ANIMATOR_HASH_NAME_NUMBER_MOVE_L_2", BF.BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_L_2);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ANIMATOR_HASH_NAME_NUMBER_MOVE_R_2", BF.BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_R_2);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ANIMATOR_HAS_NAME_SKILL_TOAST", BF.BattleConst.ANIMATOR_HAS_NAME_SKILL_TOAST);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "RIGIDBODY_CONSTRAINTS", BF.BattleConst.RIGIDBODY_CONSTRAINTS);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "LAYER_DEFAULT", _g_get_LAYER_DEFAULT);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "LAYER_HERO", _g_get_LAYER_HERO);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "LAYER_MONSTER", _g_get_LAYER_MONSTER);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "LAYER_ATK_BULLET", _g_get_LAYER_ATK_BULLET);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "LAYER_DEF_BULLET", _g_get_LAYER_DEF_BULLET);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "UnitMaterialPropertyBlock", _g_get_UnitMaterialPropertyBlock);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "UNIT_GLOW_COLOR_ID", _g_get_UNIT_GLOW_COLOR_ID);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "UNIT_GLOW_COLOR_ENABLE_ID", _g_get_UNIT_GLOW_COLOR_ENABLE_ID);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "COLOR_ICE", _g_get_COLOR_ICE);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "COLOR_STAGNATE", _g_get_COLOR_STAGNATE);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "COLOR_FEAR", _g_get_COLOR_FEAR);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "MAP_TYPE_UNLIMITED", _g_get_MAP_TYPE_UNLIMITED);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "MAP_TYPE_PORTRAIT", _g_get_MAP_TYPE_PORTRAIT);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "MAP_TYPE_SQUARE", _g_get_MAP_TYPE_SQUARE);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "MAP_TYPE_SMALL_PORTRAIT", _g_get_MAP_TYPE_SMALL_PORTRAIT);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "MAP_TYPE_SMALL_SQUARE", _g_get_MAP_TYPE_SMALL_SQUARE);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "ANIMATION_NAME_HASH_RUN", _g_get_ANIMATION_NAME_HASH_RUN);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "ANIMATION_NAME_HASH_CHARGE", _g_get_ANIMATION_NAME_HASH_CHARGE);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "ANIMATION_NAME_HASH_CHARGE_LOOP", _g_get_ANIMATION_NAME_HASH_CHARGE_LOOP);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "LAYER_DEFAULT", _s_set_LAYER_DEFAULT);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "LAYER_HERO", _s_set_LAYER_HERO);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "LAYER_MONSTER", _s_set_LAYER_MONSTER);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "LAYER_ATK_BULLET", _s_set_LAYER_ATK_BULLET);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "LAYER_DEF_BULLET", _s_set_LAYER_DEF_BULLET);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "UnitMaterialPropertyBlock", _s_set_UnitMaterialPropertyBlock);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "UNIT_GLOW_COLOR_ID", _s_set_UNIT_GLOW_COLOR_ID);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "UNIT_GLOW_COLOR_ENABLE_ID", _s_set_UNIT_GLOW_COLOR_ENABLE_ID);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "COLOR_ICE", _s_set_COLOR_ICE);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "COLOR_STAGNATE", _s_set_COLOR_STAGNATE);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "COLOR_FEAR", _s_set_COLOR_FEAR);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "MAP_TYPE_UNLIMITED", _s_set_MAP_TYPE_UNLIMITED);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "MAP_TYPE_PORTRAIT", _s_set_MAP_TYPE_PORTRAIT);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "MAP_TYPE_SQUARE", _s_set_MAP_TYPE_SQUARE);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "MAP_TYPE_SMALL_PORTRAIT", _s_set_MAP_TYPE_SMALL_PORTRAIT);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "MAP_TYPE_SMALL_SQUARE", _s_set_MAP_TYPE_SMALL_SQUARE);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "ANIMATION_NAME_HASH_RUN", _s_set_ANIMATION_NAME_HASH_RUN);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "ANIMATION_NAME_HASH_CHARGE", _s_set_ANIMATION_NAME_HASH_CHARGE);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "ANIMATION_NAME_HASH_CHARGE_LOOP", _s_set_ANIMATION_NAME_HASH_CHARGE_LOOP);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
return LuaAPI.luaL_error(L, "BF.BattleConst does not have a constructor!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_LAYER_DEFAULT(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.LAYER_DEFAULT);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_LAYER_HERO(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.LAYER_HERO);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_LAYER_MONSTER(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.LAYER_MONSTER);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_LAYER_ATK_BULLET(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.LAYER_ATK_BULLET);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_LAYER_DEF_BULLET(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.LAYER_DEF_BULLET);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_UnitMaterialPropertyBlock(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
translator.Push(L, BF.BattleConst.UnitMaterialPropertyBlock);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_UNIT_GLOW_COLOR_ID(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.UNIT_GLOW_COLOR_ID);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_UNIT_GLOW_COLOR_ENABLE_ID(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.UNIT_GLOW_COLOR_ENABLE_ID);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_COLOR_ICE(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
translator.PushUnityEngineColor(L, BF.BattleConst.COLOR_ICE);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_COLOR_STAGNATE(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
translator.PushUnityEngineColor(L, BF.BattleConst.COLOR_STAGNATE);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_COLOR_FEAR(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
translator.PushUnityEngineColor(L, BF.BattleConst.COLOR_FEAR);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_MAP_TYPE_UNLIMITED(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.MAP_TYPE_UNLIMITED);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_MAP_TYPE_PORTRAIT(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.MAP_TYPE_PORTRAIT);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_MAP_TYPE_SQUARE(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.MAP_TYPE_SQUARE);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_MAP_TYPE_SMALL_PORTRAIT(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.MAP_TYPE_SMALL_PORTRAIT);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_MAP_TYPE_SMALL_SQUARE(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.MAP_TYPE_SMALL_SQUARE);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_ANIMATION_NAME_HASH_RUN(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.ANIMATION_NAME_HASH_RUN);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_ANIMATION_NAME_HASH_CHARGE(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.ANIMATION_NAME_HASH_CHARGE);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_ANIMATION_NAME_HASH_CHARGE_LOOP(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.xlua_pushinteger(L, BF.BattleConst.ANIMATION_NAME_HASH_CHARGE_LOOP);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_LAYER_DEFAULT(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.LAYER_DEFAULT = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_LAYER_HERO(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.LAYER_HERO = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_LAYER_MONSTER(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.LAYER_MONSTER = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_LAYER_ATK_BULLET(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.LAYER_ATK_BULLET = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_LAYER_DEF_BULLET(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.LAYER_DEF_BULLET = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_UnitMaterialPropertyBlock(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
BF.BattleConst.UnitMaterialPropertyBlock = (UnityEngine.MaterialPropertyBlock)translator.GetObject(L, 1, typeof(UnityEngine.MaterialPropertyBlock));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_UNIT_GLOW_COLOR_ID(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.UNIT_GLOW_COLOR_ID = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_UNIT_GLOW_COLOR_ENABLE_ID(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.UNIT_GLOW_COLOR_ENABLE_ID = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_COLOR_ICE(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
UnityEngine.Color gen_value;translator.Get(L, 1, out gen_value);
|
|
||||||
BF.BattleConst.COLOR_ICE = gen_value;
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_COLOR_STAGNATE(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
UnityEngine.Color gen_value;translator.Get(L, 1, out gen_value);
|
|
||||||
BF.BattleConst.COLOR_STAGNATE = gen_value;
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_COLOR_FEAR(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
UnityEngine.Color gen_value;translator.Get(L, 1, out gen_value);
|
|
||||||
BF.BattleConst.COLOR_FEAR = gen_value;
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_MAP_TYPE_UNLIMITED(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.MAP_TYPE_UNLIMITED = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_MAP_TYPE_PORTRAIT(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.MAP_TYPE_PORTRAIT = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_MAP_TYPE_SQUARE(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.MAP_TYPE_SQUARE = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_MAP_TYPE_SMALL_PORTRAIT(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.MAP_TYPE_SMALL_PORTRAIT = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_MAP_TYPE_SMALL_SQUARE(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.MAP_TYPE_SMALL_SQUARE = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_ANIMATION_NAME_HASH_RUN(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.ANIMATION_NAME_HASH_RUN = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_ANIMATION_NAME_HASH_CHARGE(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.ANIMATION_NAME_HASH_CHARGE = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_ANIMATION_NAME_HASH_CHARGE_LOOP(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleConst.ANIMATION_NAME_HASH_CHARGE_LOOP = LuaAPI.xlua_tointeger(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,146 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleContinuousTargetWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleContinuousTarget);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 0, 2, 2);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Unit", _g_get_Unit);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Time", _g_get_Time);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Unit", _s_set_Unit);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Time", _s_set_Time);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleContinuousTarget();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleContinuousTarget constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_Unit(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleContinuousTarget gen_to_be_invoked = (BF.BattleContinuousTarget)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.Unit);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_Time(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleContinuousTarget gen_to_be_invoked = (BF.BattleContinuousTarget)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Time);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_Unit(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleContinuousTarget gen_to_be_invoked = (BF.BattleContinuousTarget)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.Unit = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_Time(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleContinuousTarget gen_to_be_invoked = (BF.BattleContinuousTarget)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.Time = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,371 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlBaseWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlBase);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 4, 6, 5);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddExp", _m_AddExp);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddHpPercent", _m_AddHpPercent);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddGold", _m_AddGold);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnHitBack", _m_OnHitBack);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ControlType", _g_get_ControlType);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsCollisionEnabled", _g_get_IsCollisionEnabled);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "WaitRemove", _g_get_WaitRemove);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Side", _g_get_Side);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Res", _g_get_Res);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsInCollision", _g_get_IsInCollision);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsCollisionEnabled", _s_set_IsCollisionEnabled);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "WaitRemove", _s_set_WaitRemove);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Side", _s_set_Side);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Res", _s_set_Res);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsInCollision", _s_set_IsInCollision);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlBase();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlBase constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_AddExp(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _exp = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.AddExp( _exp );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_AddHpPercent(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
double _percent = LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.AddHpPercent( _percent );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_AddGold(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _count = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.AddGold( _count );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_OnHitBack(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _distance = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
UnityEngine.Vector3 _atkerPos;translator.Get(L, 3, out _atkerPos);
|
|
||||||
|
|
||||||
gen_to_be_invoked.OnHitBack( _distance, _atkerPos );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_ControlType(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.ControlType);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_IsCollisionEnabled(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsCollisionEnabled);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_WaitRemove(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.WaitRemove);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_Side(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Side);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_Res(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Res);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_IsInCollision(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsInCollision);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_IsCollisionEnabled(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.IsCollisionEnabled = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_WaitRemove(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.WaitRemove = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_Side(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.Side = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_Res(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.Res = LuaAPI.lua_tostring(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_IsInCollision(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBase gen_to_be_invoked = (BF.BattleControlBase)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.IsInCollision = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,171 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlBoxBulletWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlBoxBullet);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 3, 0, 0);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetupBoxCollisionBody", _m_SetupBoxCollisionBody);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColliderEnabled", _m_SetColliderEnabled);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Recycle", _m_Recycle);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlBoxBullet();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlBoxBullet constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetupBoxCollisionBody(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBoxBullet gen_to_be_invoked = (BF.BattleControlBoxBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _collisionWidth = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
float _collisionHeight = (float)LuaAPI.lua_tonumber(L, 3);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetupBoxCollisionBody( _collisionWidth, _collisionHeight );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetColliderEnabled(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBoxBullet gen_to_be_invoked = (BF.BattleControlBoxBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _enabled = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetColliderEnabled( _enabled );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Recycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBoxBullet gen_to_be_invoked = (BF.BattleControlBoxBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Recycle( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,173 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlBoxColliderWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlBoxCollider);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 3, 0, 0);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetupCollisionBody", _m_SetupCollisionBody);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColliderEnabled", _m_SetColliderEnabled);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Recycle", _m_Recycle);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlBoxCollider();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlBoxCollider constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetupCollisionBody(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBoxCollider gen_to_be_invoked = (BF.BattleControlBoxCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _collisionWidth = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
float _collisionHeight = (float)LuaAPI.lua_tonumber(L, 3);
|
|
||||||
float _x = (float)LuaAPI.lua_tonumber(L, 4);
|
|
||||||
float _z = (float)LuaAPI.lua_tonumber(L, 5);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetupCollisionBody( _collisionWidth, _collisionHeight, _x, _z );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetColliderEnabled(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBoxCollider gen_to_be_invoked = (BF.BattleControlBoxCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _enabled = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetColliderEnabled( _enabled );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Recycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBoxCollider gen_to_be_invoked = (BF.BattleControlBoxCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Recycle( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,579 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlBulletWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlBullet);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 12, 4, 4);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColliderEnabled", _m_SetColliderEnabled);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Recycle", _m_Recycle);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetupBoxCollisionBody", _m_SetupBoxCollisionBody);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetupSphereCollisionBody", _m_SetupSphereCollisionBody);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetAdmin", _m_SetAdmin);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CachePosition", _m_CachePosition);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CacheTargetPosition", _m_CacheTargetPosition);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitSphereBullet", _m_InitSphereBullet);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitBoxBullet", _m_InitBoxBullet);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSearchTargetsCount", _m_GetSearchTargetsCount);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTargetId", _m_GetTargetId);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PlayTargetPointFx", _m_PlayTargetPointFx);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheX", _g_get_CacheX);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheY", _g_get_CacheY);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheZ", _g_get_CacheZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsRecycle", _g_get_IsRecycle);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheX", _s_set_CacheX);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheY", _s_set_CacheY);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheZ", _s_set_CacheZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsRecycle", _s_set_IsRecycle);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlBullet();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlBullet constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetColliderEnabled(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _enabled = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetColliderEnabled( _enabled );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Recycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Recycle( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetupBoxCollisionBody(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _collisionWidth = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
float _collisionHeight = (float)LuaAPI.lua_tonumber(L, 3);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetupBoxCollisionBody( _collisionWidth, _collisionHeight );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetupSphereCollisionBody(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _collisionRadius = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetupSphereCollisionBody( _collisionRadius );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetAdmin(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlUnit _unit = (BF.BattleControlUnit)translator.GetObject(L, 2, typeof(BF.BattleControlUnit));
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetAdmin( _unit );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_CachePosition(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.CachePosition( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_CacheTargetPosition(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.CacheTargetPosition( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitSphereBullet(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _skillId = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
int _cloneIndex = LuaAPI.xlua_tointeger(L, 3);
|
|
||||||
int _skillEffectIndex = LuaAPI.xlua_tointeger(L, 4);
|
|
||||||
int _bulletType = LuaAPI.xlua_tointeger(L, 5);
|
|
||||||
int _bulletFinishType = LuaAPI.xlua_tointeger(L, 6);
|
|
||||||
int _bulletOriginType = LuaAPI.xlua_tointeger(L, 7);
|
|
||||||
int _searchType = LuaAPI.xlua_tointeger(L, 8);
|
|
||||||
float _radius = (float)LuaAPI.lua_tonumber(L, 9);
|
|
||||||
float _duration = (float)LuaAPI.lua_tonumber(L, 10);
|
|
||||||
float _speed = (float)LuaAPI.lua_tonumber(L, 11);
|
|
||||||
float _offsetX = (float)LuaAPI.lua_tonumber(L, 12);
|
|
||||||
float _offsetZ = (float)LuaAPI.lua_tonumber(L, 13);
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitSphereBullet( _skillId, _cloneIndex, _skillEffectIndex, _bulletType, _bulletFinishType, _bulletOriginType, _searchType, _radius, _duration, _speed, _offsetX, _offsetZ );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitBoxBullet(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _skillId = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
int _cloneIndex = LuaAPI.xlua_tointeger(L, 3);
|
|
||||||
int _skillEffectIndex = LuaAPI.xlua_tointeger(L, 4);
|
|
||||||
int _bulletType = LuaAPI.xlua_tointeger(L, 5);
|
|
||||||
int _bulletFinishType = LuaAPI.xlua_tointeger(L, 6);
|
|
||||||
int _bulletOriginType = LuaAPI.xlua_tointeger(L, 7);
|
|
||||||
int _searchType = LuaAPI.xlua_tointeger(L, 8);
|
|
||||||
float _w = (float)LuaAPI.lua_tonumber(L, 9);
|
|
||||||
float _h = (float)LuaAPI.lua_tonumber(L, 10);
|
|
||||||
float _duration = (float)LuaAPI.lua_tonumber(L, 11);
|
|
||||||
float _speed = (float)LuaAPI.lua_tonumber(L, 12);
|
|
||||||
float _offsetX = (float)LuaAPI.lua_tonumber(L, 13);
|
|
||||||
float _offsetZ = (float)LuaAPI.lua_tonumber(L, 14);
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitBoxBullet( _skillId, _cloneIndex, _skillEffectIndex, _bulletType, _bulletFinishType, _bulletOriginType, _searchType, _w, _h, _duration, _speed, _offsetX, _offsetZ );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetSearchTargetsCount(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetSearchTargetsCount( );
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetTargetId(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetTargetId( _index );
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_PlayTargetPointFx(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _id = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
float _delay = (float)LuaAPI.lua_tonumber(L, 3);
|
|
||||||
|
|
||||||
gen_to_be_invoked.PlayTargetPointFx( _id, _delay );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_CacheX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheX);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_CacheY(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheY);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_CacheZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheZ);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_IsRecycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsRecycle);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_CacheX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.CacheX = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_CacheY(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.CacheY = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_CacheZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.CacheZ = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_IsRecycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlBullet gen_to_be_invoked = (BF.BattleControlBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.IsRecycle = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,554 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlColliderContainerWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlColliderContainer);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 14, 2, 2);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitBase", _m_InitBase);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetIsSearchByCollider", _m_SetIsSearchByCollider);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Add", _m_Add);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Remove", _m_Remove);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSearchTargetsCount", _m_GetSearchTargetsCount);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetCollidersCount", _m_GetCollidersCount);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetCollider", _m_GetCollider);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTargetId", _m_GetTargetId);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CachePosition", _m_CachePosition);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "FastGetColliderX", _m_FastGetColliderX);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "FastGetColliderZ", _m_FastGetColliderZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StartSearch", _m_StartSearch);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIsFinished", _m_GetIsFinished);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Recycle", _m_Recycle);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsRecycle", _g_get_IsRecycle);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsSearchByCollider", _g_get_IsSearchByCollider);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsRecycle", _s_set_IsRecycle);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsSearchByCollider", _s_set_IsSearchByCollider);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlColliderContainer();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlColliderContainer constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitBase(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitBase( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetIsSearchByCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _isSearchByCollider = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetIsSearchByCollider( _isSearchByCollider );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Add(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlCollider _collider = (BF.BattleControlCollider)translator.GetObject(L, 2, typeof(BF.BattleControlCollider));
|
|
||||||
|
|
||||||
gen_to_be_invoked.Add( _collider );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Remove(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlCollider _collider = (BF.BattleControlCollider)translator.GetObject(L, 2, typeof(BF.BattleControlCollider));
|
|
||||||
|
|
||||||
gen_to_be_invoked.Remove( _collider );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetSearchTargetsCount(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetSearchTargetsCount( );
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetCollidersCount(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetCollidersCount( );
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _colliderIndex = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetCollider( _colliderIndex );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetTargetId(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _colliderIndex = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
int _index = LuaAPI.xlua_tointeger(L, 3);
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetTargetId( _colliderIndex, _index );
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_CachePosition(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.CachePosition( _index );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_FastGetColliderX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.FastGetColliderX( _index );
|
|
||||||
LuaAPI.lua_pushnumber(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_FastGetColliderZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.FastGetColliderZ( _index );
|
|
||||||
LuaAPI.lua_pushnumber(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_StartSearch(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.StartSearch( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetIsFinished(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetIsFinished( );
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Recycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Recycle( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_IsRecycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsRecycle);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_IsSearchByCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsSearchByCollider);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_IsRecycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.IsRecycle = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_IsSearchByCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlColliderContainer gen_to_be_invoked = (BF.BattleControlColliderContainer)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.IsSearchByCollider = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,769 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlColliderWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlCollider);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 18, 5, 5);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColliderEnabled", _m_SetColliderEnabled);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Recycle", _m_Recycle);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetContainer", _m_SetContainer);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveFromContainer", _m_RemoveFromContainer);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetIsSearchByCollider", _m_SetIsSearchByCollider);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetAdmin", _m_SetAdmin);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetUniqueId", _m_GetUniqueId);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTargetPosition", _m_SetTargetPosition);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLockTarget", _m_SetLockTarget);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetUpdatePositionWithLockTarget", _m_SetUpdatePositionWithLockTarget);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitPosition", _m_InitPosition);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CachePosition", _m_CachePosition);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitBase", _m_InitBase);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Search", _m_Search);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StartSearch", _m_StartSearch);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddCheckTargetList", _m_AddCheckTargetList);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSearchTargetsCount", _m_GetSearchTargetsCount);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTargetId", _m_GetTargetId);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "uniqueId", _g_get_uniqueId);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheX", _g_get_CacheX);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheY", _g_get_CacheY);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheZ", _g_get_CacheZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsRecycle", _g_get_IsRecycle);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "uniqueId", _s_set_uniqueId);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheX", _s_set_CacheX);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheY", _s_set_CacheY);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheZ", _s_set_CacheZ);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsRecycle", _s_set_IsRecycle);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlCollider();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlCollider constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetColliderEnabled(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _enabled = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetColliderEnabled( _enabled );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Recycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Recycle( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetContainer(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlColliderContainer _container = (BF.BattleControlColliderContainer)translator.GetObject(L, 2, typeof(BF.BattleControlColliderContainer));
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetContainer( _container );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RemoveFromContainer(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.RemoveFromContainer( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetIsSearchByCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _isSearchByCollider = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetIsSearchByCollider( _isSearchByCollider );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetAdmin(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlUnit _unit = (BF.BattleControlUnit)translator.GetObject(L, 2, typeof(BF.BattleControlUnit));
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetAdmin( _unit );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetUniqueId(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetUniqueId( );
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetTargetPosition(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
UnityEngine.Vector3 _position;translator.Get(L, 2, out _position);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetTargetPosition( _position );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetLockTarget(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlUnit _unit = (BF.BattleControlUnit)translator.GetObject(L, 2, typeof(BF.BattleControlUnit));
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetLockTarget( _unit );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetUpdatePositionWithLockTarget(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _updatePositionWithLockTarget = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetUpdatePositionWithLockTarget( _updatePositionWithLockTarget );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitPosition(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _x = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
float _y = (float)LuaAPI.lua_tonumber(L, 3);
|
|
||||||
float _z = (float)LuaAPI.lua_tonumber(L, 4);
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitPosition( _x, _y, _z );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_CachePosition(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.CachePosition( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitBase(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitBase( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Search(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _checkType = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
float _interval = (float)LuaAPI.lua_tonumber(L, 3);
|
|
||||||
float _duration = (float)LuaAPI.lua_tonumber(L, 4);
|
|
||||||
int _skillId = LuaAPI.xlua_tointeger(L, 5);
|
|
||||||
int _cloneIndex = LuaAPI.xlua_tointeger(L, 6);
|
|
||||||
int _skillEffectIndex = LuaAPI.xlua_tointeger(L, 7);
|
|
||||||
bool _unlimitCount = LuaAPI.lua_toboolean(L, 8);
|
|
||||||
float _delayAimTime = (float)LuaAPI.lua_tonumber(L, 9);
|
|
||||||
float _aimFollowTime = (float)LuaAPI.lua_tonumber(L, 10);
|
|
||||||
float _aimFollowSpeed = (float)LuaAPI.lua_tonumber(L, 11);
|
|
||||||
bool _disposable = LuaAPI.lua_toboolean(L, 12);
|
|
||||||
|
|
||||||
gen_to_be_invoked.Search( _checkType, _interval, _duration, _skillId, _cloneIndex, _skillEffectIndex, _unlimitCount, _delayAimTime, _aimFollowTime, _aimFollowSpeed, _disposable );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_StartSearch(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.StartSearch( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_AddCheckTargetList(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
UnityEngine.GameObject _gameObject = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
||||||
|
|
||||||
gen_to_be_invoked.AddCheckTargetList( _gameObject );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetSearchTargetsCount(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetSearchTargetsCount( );
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetTargetId(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetTargetId( _index );
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_uniqueId(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.uniqueId);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_CacheX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheX);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_CacheY(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheY);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_CacheZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheZ);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_IsRecycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsRecycle);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_uniqueId(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.uniqueId = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_CacheX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.CacheX = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_CacheY(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.CacheY = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_CacheZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.CacheZ = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_IsRecycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.IsRecycle = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,517 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlHeroWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlHero);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 14, 1, 1);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitHero", _m_InitHero);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitHpBar", _m_InitHpBar);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshHpBar", _m_RefreshHpBar);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshShieldBar", _m_RefreshShieldBar);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetCameraStartPosition", _m_SetCameraStartPosition);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "MoveAndAttack", _m_MoveAndAttack);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetNearestLeftRightUnit", _m_GetNearestLeftRightUnit);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetWhetherUseGroundSkill", _m_GetWhetherUseGroundSkill);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StopMove", _m_StopMove);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StartMove", _m_StartMove);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnDead", _m_OnDead);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Reborn", _m_Reborn);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Revive", _m_Revive);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Clear", _m_Clear);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsCameraFollowWithHero", _g_get_IsCameraFollowWithHero);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsCameraFollowWithHero", _s_set_IsCameraFollowWithHero);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlHero();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlHero constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitHero(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _side = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
BF.CharacterSpineHelper _helper = (BF.CharacterSpineHelper)translator.GetObject(L, 3, typeof(BF.CharacterSpineHelper));
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitHero( _side, _helper );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitHpBar(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitHpBar( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RefreshHpBar(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _percent = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.RefreshHpBar( _percent );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RefreshShieldBar(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _percent = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
bool _visible = LuaAPI.lua_toboolean(L, 3);
|
|
||||||
|
|
||||||
gen_to_be_invoked.RefreshShieldBar( _percent, _visible );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetCameraStartPosition(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
UnityEngine.Vector3 _originPosition;translator.Get(L, 2, out _originPosition);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetCameraStartPosition( _originPosition );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_MoveAndAttack(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _direction = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.MoveAndAttack( _direction );
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetNearestLeftRightUnit(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetNearestLeftRightUnit( );
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetWhetherUseGroundSkill(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetWhetherUseGroundSkill( );
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_StopMove(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.StopMove( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_StartMove(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.StartMove( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_OnDead(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.OnDead( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Reborn(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Reborn( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Revive(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Revive( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Clear(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Clear( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_IsCameraFollowWithHero(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsCameraFollowWithHero);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_IsCameraFollowWithHero(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.IsCameraFollowWithHero = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,170 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlMonsterExtendWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlMonsterExtend);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 3, 0, 0);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetControl", _m_SetControl);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnRecycle", _m_OnRecycle);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlMonsterExtend();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlMonsterExtend constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetControl(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonsterExtend gen_to_be_invoked = (BF.BattleControlMonsterExtend)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlMonster _control = (BF.BattleControlMonster)translator.GetObject(L, 2, typeof(BF.BattleControlMonster));
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetControl( _control );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Init(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonsterExtend gen_to_be_invoked = (BF.BattleControlMonsterExtend)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
long _id = LuaAPI.lua_toint64(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.Init( _id );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_OnRecycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonsterExtend gen_to_be_invoked = (BF.BattleControlMonsterExtend)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.OnRecycle( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,664 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlMonsterWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlMonster);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 20, 0, 0);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitMonster", _m_InitMonster);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitHpBar", _m_InitHpBar);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshHpBar", _m_RefreshHpBar);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitPosition", _m_InitPosition);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "EnterDisappear", _m_EnterDisappear);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ExitDisappear", _m_ExitDisappear);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTarget", _m_SetTarget);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIsNormalMonster", _m_GetIsNormalMonster);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIsBOSS", _m_GetIsBOSS);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StopMove", _m_StopMove);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StartMove", _m_StartMove);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InstantKill", _m_InstantKill);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PlayAirborne", _m_PlayAirborne);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StopAirborne", _m_StopAirborne);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "MoveWithSkillAI", _m_MoveWithSkillAI);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "TowardToTarget", _m_TowardToTarget);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ForceTowardToTarget", _m_ForceTowardToTarget);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "BeHitBack", _m_BeHitBack);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnDead", _m_OnDead);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Clear", _m_Clear);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlMonster();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlMonster constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitMonster(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _side = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
BF.CharacterSpineHelper _helper = (BF.CharacterSpineHelper)translator.GetObject(L, 3, typeof(BF.CharacterSpineHelper));
|
|
||||||
UnityEngine.Transform _body = (UnityEngine.Transform)translator.GetObject(L, 4, typeof(UnityEngine.Transform));
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitMonster( _side, _helper, _body );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitHpBar(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitHpBar( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RefreshHpBar(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _percent = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.RefreshHpBar( _percent );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitPosition(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _x = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
float _y = (float)LuaAPI.lua_tonumber(L, 3);
|
|
||||||
float _z = (float)LuaAPI.lua_tonumber(L, 4);
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitPosition( _x, _y, _z );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_EnterDisappear(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.EnterDisappear( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_ExitDisappear(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.ExitDisappear( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetTarget(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlUnit _target = (BF.BattleControlUnit)translator.GetObject(L, 2, typeof(BF.BattleControlUnit));
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetTarget( _target );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetIsNormalMonster(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetIsNormalMonster( );
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetIsBOSS(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetIsBOSS( );
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_StopMove(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.StopMove( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_StartMove(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.StartMove( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InstantKill(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.InstantKill( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_PlayAirborne(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.PlayAirborne( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_StopAirborne(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.StopAirborne( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_MoveWithSkillAI(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _target = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
int _horizontal = LuaAPI.xlua_tointeger(L, 3);
|
|
||||||
float _x = (float)LuaAPI.lua_tonumber(L, 4);
|
|
||||||
float _z = (float)LuaAPI.lua_tonumber(L, 5);
|
|
||||||
int _refresh = LuaAPI.xlua_tointeger(L, 6);
|
|
||||||
int _across = LuaAPI.xlua_tointeger(L, 7);
|
|
||||||
float _speed = (float)LuaAPI.lua_tonumber(L, 8);
|
|
||||||
int _endType = LuaAPI.xlua_tointeger(L, 9);
|
|
||||||
float _endValue = (float)LuaAPI.lua_tonumber(L, 10);
|
|
||||||
int _collisionType = LuaAPI.xlua_tointeger(L, 11);
|
|
||||||
|
|
||||||
gen_to_be_invoked.MoveWithSkillAI( _target, _horizontal, _x, _z, _refresh, _across, _speed, _endType, _endValue, _collisionType );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_TowardToTarget(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.TowardToTarget( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_ForceTowardToTarget(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.ForceTowardToTarget( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_BeHitBack(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.BeHitBack( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_OnDead(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.OnDead( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Clear(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlMonster gen_to_be_invoked = (BF.BattleControlMonster)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Clear( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,170 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlSphereBulletWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlSphereBullet);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 3, 0, 0);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetupSphereCollisionBody", _m_SetupSphereCollisionBody);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColliderEnabled", _m_SetColliderEnabled);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Recycle", _m_Recycle);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlSphereBullet();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlSphereBullet constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetupSphereCollisionBody(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlSphereBullet gen_to_be_invoked = (BF.BattleControlSphereBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _collisionRadius = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetupSphereCollisionBody( _collisionRadius );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetColliderEnabled(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlSphereBullet gen_to_be_invoked = (BF.BattleControlSphereBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _enabled = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetColliderEnabled( _enabled );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Recycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlSphereBullet gen_to_be_invoked = (BF.BattleControlSphereBullet)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Recycle( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,172 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlSphereColliderWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlSphereCollider);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 3, 0, 0);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetupCollisionBody", _m_SetupCollisionBody);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColliderEnabled", _m_SetColliderEnabled);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Recycle", _m_Recycle);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlSphereCollider();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlSphereCollider constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetupCollisionBody(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlSphereCollider gen_to_be_invoked = (BF.BattleControlSphereCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _collisionRadius = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
float _x = (float)LuaAPI.lua_tonumber(L, 3);
|
|
||||||
float _z = (float)LuaAPI.lua_tonumber(L, 4);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetupCollisionBody( _collisionRadius, _x, _z );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetColliderEnabled(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlSphereCollider gen_to_be_invoked = (BF.BattleControlSphereCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _enabled = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetColliderEnabled( _enabled );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Recycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlSphereCollider gen_to_be_invoked = (BF.BattleControlSphereCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Recycle( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,263 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlWarningColliderWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlWarningCollider);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 3, 3, 3);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitWarningType", _m_InitWarningType);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColliderEnable", _m_SetColliderEnable);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColliderDisable", _m_SetColliderDisable);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "parentWarning", _g_get_parentWarning);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "boxCollider", _g_get_boxCollider);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "sphereCollider", _g_get_sphereCollider);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "parentWarning", _s_set_parentWarning);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "boxCollider", _s_set_boxCollider);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "sphereCollider", _s_set_sphereCollider);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlWarningCollider();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlWarningCollider constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitWarningType(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlWarning _parentWarning = (BF.BattleControlWarning)translator.GetObject(L, 2, typeof(BF.BattleControlWarning));
|
|
||||||
int _warningType = LuaAPI.xlua_tointeger(L, 3);
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitWarningType( _parentWarning, _warningType );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetColliderEnable(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetColliderEnable( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetColliderDisable(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetColliderDisable( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_parentWarning(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.parentWarning);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_boxCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.boxCollider);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_sphereCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.sphereCollider);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_parentWarning(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.parentWarning = (BF.BattleControlWarning)translator.GetObject(L, 2, typeof(BF.BattleControlWarning));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_boxCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.boxCollider = (UnityEngine.BoxCollider)translator.GetObject(L, 2, typeof(UnityEngine.BoxCollider));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_sphereCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.sphereCollider = (UnityEngine.SphereCollider)translator.GetObject(L, 2, typeof(UnityEngine.SphereCollider));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,489 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleControlWarningWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleControlWarning);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 10, 3, 3);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetUniqueId", _m_GetUniqueId);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIsEnable", _m_GetIsEnable);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIsRecycle", _m_GetIsRecycle);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitOwnerAndTarget", _m_InitOwnerAndTarget);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitCircleWarning", _m_InitCircleWarning);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitRectWarning", _m_InitRectWarning);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitFollowColliderWarning", _m_InitFollowColliderWarning);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Recycle", _m_Recycle);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddLuaOnBattleEvent", _m_AddLuaOnBattleEvent);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBattleEvent", _m_OnBattleEvent);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "outSp", _g_get_outSp);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "inSp", _g_get_inSp);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "controlCollider", _g_get_controlCollider);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "outSp", _s_set_outSp);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "inSp", _s_set_inSp);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "controlCollider", _s_set_controlCollider);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleControlWarning();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleControlWarning constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetUniqueId(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetUniqueId( );
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetIsEnable(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetIsEnable( );
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetIsRecycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetIsRecycle( );
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitOwnerAndTarget(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlUnit _owner = (BF.BattleControlUnit)translator.GetObject(L, 2, typeof(BF.BattleControlUnit));
|
|
||||||
BF.BattleControlUnit _target = (BF.BattleControlUnit)translator.GetObject(L, 3, typeof(BF.BattleControlUnit));
|
|
||||||
int _uniqueId = LuaAPI.xlua_tointeger(L, 4);
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitOwnerAndTarget( _owner, _target, _uniqueId );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitCircleWarning(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _warningType = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
float _deflectionX = (float)LuaAPI.lua_tonumber(L, 3);
|
|
||||||
float _deflectionZ = (float)LuaAPI.lua_tonumber(L, 4);
|
|
||||||
float _warningRadius = (float)LuaAPI.lua_tonumber(L, 5);
|
|
||||||
float _warningDelayTime = (float)LuaAPI.lua_tonumber(L, 6);
|
|
||||||
float _warningDuration = (float)LuaAPI.lua_tonumber(L, 7);
|
|
||||||
int _warningTargetType = LuaAPI.xlua_tointeger(L, 8);
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitCircleWarning( _warningType, _deflectionX, _deflectionZ, _warningRadius, _warningDelayTime, _warningDuration, _warningTargetType );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitRectWarning(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _warningType = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
float _startDeflectionX = (float)LuaAPI.lua_tonumber(L, 3);
|
|
||||||
float _startDeflectionZ = (float)LuaAPI.lua_tonumber(L, 4);
|
|
||||||
float _endDeflectionX = (float)LuaAPI.lua_tonumber(L, 5);
|
|
||||||
float _endDeflectionZ = (float)LuaAPI.lua_tonumber(L, 6);
|
|
||||||
float _warningRectX = (float)LuaAPI.lua_tonumber(L, 7);
|
|
||||||
float _warningRectY = (float)LuaAPI.lua_tonumber(L, 8);
|
|
||||||
float _warningDelayTime = (float)LuaAPI.lua_tonumber(L, 9);
|
|
||||||
float _warningDuration = (float)LuaAPI.lua_tonumber(L, 10);
|
|
||||||
int _warningTargetType = LuaAPI.xlua_tointeger(L, 11);
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitRectWarning( _warningType, _startDeflectionX, _startDeflectionZ, _endDeflectionX, _endDeflectionZ, _warningRectX, _warningRectY, _warningDelayTime, _warningDuration, _warningTargetType );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_InitFollowColliderWarning(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _warningType = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
float _deflectionX = (float)LuaAPI.lua_tonumber(L, 3);
|
|
||||||
float _deflectionZ = (float)LuaAPI.lua_tonumber(L, 4);
|
|
||||||
float _warningRadius = (float)LuaAPI.lua_tonumber(L, 5);
|
|
||||||
float _warningDelayTime = (float)LuaAPI.lua_tonumber(L, 6);
|
|
||||||
float _warningDuration = (float)LuaAPI.lua_tonumber(L, 7);
|
|
||||||
BF.BattleControlCollider _collider = (BF.BattleControlCollider)translator.GetObject(L, 8, typeof(BF.BattleControlCollider));
|
|
||||||
|
|
||||||
gen_to_be_invoked.InitFollowColliderWarning( _warningType, _deflectionX, _deflectionZ, _warningRadius, _warningDelayTime, _warningDuration, _collider );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Recycle(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Recycle( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_AddLuaOnBattleEvent(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
System.Action<int> _luaFunc = translator.GetDelegate<System.Action<int>>(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.AddLuaOnBattleEvent( _luaFunc );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_OnBattleEvent(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _eventType = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.OnBattleEvent( _eventType );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_outSp(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.outSp);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_inSp(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.inSp);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_controlCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.controlCollider);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_outSp(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.outSp = (UnityEngine.SpriteRenderer)translator.GetObject(L, 2, typeof(UnityEngine.SpriteRenderer));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_inSp(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.inSp = (UnityEngine.SpriteRenderer)translator.GetObject(L, 2, typeof(UnityEngine.SpriteRenderer));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_controlCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.controlCollider = (BF.BattleControlWarningCollider)translator.GetObject(L, 2, typeof(BF.BattleControlWarningCollider));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,292 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleEffectNumberWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleEffectNumber);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 4, 3, 3);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowEffectNumber", _m_ShowEffectNumber);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetEnabled", _m_SetEnabled);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetPause", _m_SetPause);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetResume", _m_SetResume);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "animator", _g_get_animator);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "effectText", _g_get_effectText);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ColorType", _g_get_ColorType);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "animator", _s_set_animator);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "effectText", _s_set_effectText);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ColorType", _s_set_ColorType);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleEffectNumber();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleEffectNumber constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_ShowEffectNumber(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleEffectNumber gen_to_be_invoked = (BF.BattleEffectNumber)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _effectType = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
string _effectNumber = LuaAPI.lua_tostring(L, 3);
|
|
||||||
|
|
||||||
gen_to_be_invoked.ShowEffectNumber( _effectType, _effectNumber );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetEnabled(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleEffectNumber gen_to_be_invoked = (BF.BattleEffectNumber)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _enabled = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetEnabled( _enabled );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetPause(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleEffectNumber gen_to_be_invoked = (BF.BattleEffectNumber)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetPause( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetResume(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleEffectNumber gen_to_be_invoked = (BF.BattleEffectNumber)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetResume( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_animator(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleEffectNumber gen_to_be_invoked = (BF.BattleEffectNumber)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.animator);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_effectText(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleEffectNumber gen_to_be_invoked = (BF.BattleEffectNumber)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.effectText);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_ColorType(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleEffectNumber gen_to_be_invoked = (BF.BattleEffectNumber)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ColorType);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_animator(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleEffectNumber gen_to_be_invoked = (BF.BattleEffectNumber)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.animator = (UnityEngine.Animator)translator.GetObject(L, 2, typeof(UnityEngine.Animator));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_effectText(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleEffectNumber gen_to_be_invoked = (BF.BattleEffectNumber)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.effectText = (TMPro.TextMeshProUGUI)translator.GetObject(L, 2, typeof(TMPro.TextMeshProUGUI));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_ColorType(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleEffectNumber gen_to_be_invoked = (BF.BattleEffectNumber)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.ColorType = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,217 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleHelperWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleHelper);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 6, 1, 1);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "Init", _m_Init_xlua_st_);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "Pause", _m_Pause_xlua_st_);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "Resume", _m_Resume_xlua_st_);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "CreateSequence", _m_CreateSequence_xlua_st_);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "Clear", _m_Clear_xlua_st_);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "pause", _g_get_pause);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "pause", _s_set_pause);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
return LuaAPI.luaL_error(L, "BF.BattleHelper does not have a constructor!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Init_xlua_st_(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
BF.BattleHelper.Init( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Pause_xlua_st_(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
BF.BattleHelper.Pause( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Resume_xlua_st_(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
BF.BattleHelper.Resume( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_CreateSequence_xlua_st_(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = BF.BattleHelper.CreateSequence( );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Clear_xlua_st_(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
BF.BattleHelper.Clear( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_pause(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
LuaAPI.lua_pushboolean(L, BF.BattleHelper.pause);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_pause(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
BF.BattleHelper.pause = LuaAPI.lua_toboolean(L, 1);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,264 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleHpBarWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleHpBar);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 3, 3, 3);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshHpBar", _m_RefreshHpBar);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetShieldVisible", _m_SetShieldVisible);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshShieldBar", _m_RefreshShieldBar);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Slider", _g_get_Slider);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ShieldBg", _g_get_ShieldBg);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ShieldSlider", _g_get_ShieldSlider);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Slider", _s_set_Slider);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ShieldBg", _s_set_ShieldBg);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ShieldSlider", _s_set_ShieldSlider);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleHpBar();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleHpBar constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RefreshHpBar(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleHpBar gen_to_be_invoked = (BF.BattleHpBar)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _percent = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.RefreshHpBar( _percent );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetShieldVisible(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleHpBar gen_to_be_invoked = (BF.BattleHpBar)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _visible = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetShieldVisible( _visible );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RefreshShieldBar(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleHpBar gen_to_be_invoked = (BF.BattleHpBar)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
float _percent = (float)LuaAPI.lua_tonumber(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.RefreshShieldBar( _percent );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_Slider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleHpBar gen_to_be_invoked = (BF.BattleHpBar)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.Slider);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_ShieldBg(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleHpBar gen_to_be_invoked = (BF.BattleHpBar)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.ShieldBg);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_ShieldSlider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleHpBar gen_to_be_invoked = (BF.BattleHpBar)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.ShieldSlider);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_Slider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleHpBar gen_to_be_invoked = (BF.BattleHpBar)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.Slider = (BF.BFSlider)translator.GetObject(L, 2, typeof(BF.BFSlider));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_ShieldBg(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleHpBar gen_to_be_invoked = (BF.BattleHpBar)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.ShieldBg = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_ShieldSlider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleHpBar gen_to_be_invoked = (BF.BattleHpBar)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.ShieldSlider = (BF.BFSlider)translator.GetObject(L, 2, typeof(BF.BFSlider));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,177 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattlePetDataWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattlePetData);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 0, 3, 3);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsInit", _g_get_IsInit);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Res", _g_get_Res);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Follow", _g_get_Follow);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsInit", _s_set_IsInit);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Res", _s_set_Res);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Follow", _s_set_Follow);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattlePetData();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattlePetData constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_IsInit(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattlePetData gen_to_be_invoked = (BF.BattlePetData)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsInit);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_Res(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattlePetData gen_to_be_invoked = (BF.BattlePetData)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Res);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_Follow(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattlePetData gen_to_be_invoked = (BF.BattlePetData)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Follow);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_IsInit(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattlePetData gen_to_be_invoked = (BF.BattlePetData)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.IsInit = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_Res(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattlePetData gen_to_be_invoked = (BF.BattlePetData)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.Res = LuaAPI.lua_tostring(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_Follow(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattlePetData gen_to_be_invoked = (BF.BattlePetData)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.Follow = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,928 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattlePoolWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattlePool);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 28, 0, 0);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetSceneNode", _m_SetSceneNode);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetShadow", _m_SetShadow);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetShadow", _m_GetShadow);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetEffectText", _m_SetEffectText);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetHpBar", _m_SetHpBar);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetSkillToast", _m_SetSkillToast);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillBoxCollider", _m_GetSkillBoxCollider);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RecycleSkillBoxCollider", _m_RecycleSkillBoxCollider);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillSphereCollider", _m_GetSkillSphereCollider);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RecycleSkillSphereCollider", _m_RecycleSkillSphereCollider);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetContinuousTarge", _m_GetContinuousTarge);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RecycleContinuousTarge", _m_RecycleContinuousTarge);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetColliderContainer", _m_GetColliderContainer);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RecycleColliderContainer", _m_RecycleColliderContainer);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSphereBullet", _m_GetSphereBullet);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RecycleSphereBullet", _m_RecycleSphereBullet);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetBoxBullet", _m_GetBoxBullet);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RecycleBoxBullet", _m_RecycleBoxBullet);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetEffectText", _m_GetEffectText);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PutBackEffectText", _m_PutBackEffectText);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetHpBar", _m_GetHpBar);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PutBackHpBar", _m_PutBackHpBar);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillToast", _m_GetSkillToast);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PutBackSkillToast", _m_PutBackSkillToast);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Pause", _m_Pause);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Resume", _m_Resume);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Clear", _m_Clear);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 2, 0, 0);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetColliderUniqueId", _m_GetColliderUniqueId_xlua_st_);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattlePool();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattlePool constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Init(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Init( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetSceneNode(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
UnityEngine.Transform _sceneNode = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetSceneNode( _sceneNode );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetShadow(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
UnityEngine.GameObject _shadow = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetShadow( _shadow );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetShadow(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetShadow( );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetEffectText(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
UnityEngine.GameObject _effectText = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
||||||
UnityEngine.GameObject _effectTextRed = (UnityEngine.GameObject)translator.GetObject(L, 3, typeof(UnityEngine.GameObject));
|
|
||||||
UnityEngine.GameObject _effectTextGreen = (UnityEngine.GameObject)translator.GetObject(L, 4, typeof(UnityEngine.GameObject));
|
|
||||||
UnityEngine.GameObject _effectTextYellow = (UnityEngine.GameObject)translator.GetObject(L, 5, typeof(UnityEngine.GameObject));
|
|
||||||
UnityEngine.Transform _numberRoot = (UnityEngine.Transform)translator.GetObject(L, 6, typeof(UnityEngine.Transform));
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetEffectText( _effectText, _effectTextRed, _effectTextGreen, _effectTextYellow, _numberRoot );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetHpBar(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
UnityEngine.GameObject _hpAtk = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
||||||
UnityEngine.GameObject _hpDef = (UnityEngine.GameObject)translator.GetObject(L, 3, typeof(UnityEngine.GameObject));
|
|
||||||
UnityEngine.Transform _numberRoot = (UnityEngine.Transform)translator.GetObject(L, 4, typeof(UnityEngine.Transform));
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetHpBar( _hpAtk, _hpDef, _numberRoot );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetSkillToast(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
UnityEngine.GameObject _skillToast = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
||||||
UnityEngine.Transform _skillToastRoot = (UnityEngine.Transform)translator.GetObject(L, 3, typeof(UnityEngine.Transform));
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetSkillToast( _skillToast, _skillToastRoot );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetSkillBoxCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetSkillBoxCollider( );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RecycleSkillBoxCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlBoxCollider _box = (BF.BattleControlBoxCollider)translator.GetObject(L, 2, typeof(BF.BattleControlBoxCollider));
|
|
||||||
|
|
||||||
gen_to_be_invoked.RecycleSkillBoxCollider( _box );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetSkillSphereCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetSkillSphereCollider( );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RecycleSkillSphereCollider(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlSphereCollider _sphere = (BF.BattleControlSphereCollider)translator.GetObject(L, 2, typeof(BF.BattleControlSphereCollider));
|
|
||||||
|
|
||||||
gen_to_be_invoked.RecycleSkillSphereCollider( _sphere );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetContinuousTarge(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetContinuousTarge( );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RecycleContinuousTarge(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleContinuousTarget _target = (BF.BattleContinuousTarget)translator.GetObject(L, 2, typeof(BF.BattleContinuousTarget));
|
|
||||||
|
|
||||||
gen_to_be_invoked.RecycleContinuousTarge( _target );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetColliderContainer(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetColliderContainer( );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RecycleColliderContainer(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlColliderContainer _container = (BF.BattleControlColliderContainer)translator.GetObject(L, 2, typeof(BF.BattleControlColliderContainer));
|
|
||||||
|
|
||||||
gen_to_be_invoked.RecycleColliderContainer( _container );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetSphereBullet(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetSphereBullet( );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RecycleSphereBullet(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlSphereBullet _bullet = (BF.BattleControlSphereBullet)translator.GetObject(L, 2, typeof(BF.BattleControlSphereBullet));
|
|
||||||
|
|
||||||
gen_to_be_invoked.RecycleSphereBullet( _bullet );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetBoxBullet(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetBoxBullet( );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_RecycleBoxBullet(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleControlBoxBullet _bullet = (BF.BattleControlBoxBullet)translator.GetObject(L, 2, typeof(BF.BattleControlBoxBullet));
|
|
||||||
|
|
||||||
gen_to_be_invoked.RecycleBoxBullet( _bullet );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetEffectText(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _colorType = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetEffectText( _colorType );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_PutBackEffectText(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleEffectNumber _comp = (BF.BattleEffectNumber)translator.GetObject(L, 2, typeof(BF.BattleEffectNumber));
|
|
||||||
int _colorType = LuaAPI.xlua_tointeger(L, 3);
|
|
||||||
|
|
||||||
gen_to_be_invoked.PutBackEffectText( _comp, _colorType );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetHpBar(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _side = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetHpBar( _side );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_PutBackHpBar(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleHpBar _comp = (BF.BattleHpBar)translator.GetObject(L, 2, typeof(BF.BattleHpBar));
|
|
||||||
int _side = LuaAPI.xlua_tointeger(L, 3);
|
|
||||||
|
|
||||||
gen_to_be_invoked.PutBackHpBar( _comp, _side );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetSkillToast(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetSkillToast( );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_PutBackSkillToast(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
BF.BattleSkillToast _comp = (BF.BattleSkillToast)translator.GetObject(L, 2, typeof(BF.BattleSkillToast));
|
|
||||||
|
|
||||||
gen_to_be_invoked.PutBackSkillToast( _comp );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetColliderUniqueId_xlua_st_(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = BF.BattlePool.GetColliderUniqueId( );
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Pause(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Pause( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Resume(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Resume( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_Clear(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattlePool gen_to_be_invoked = (BF.BattlePool)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.Clear( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,121 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattlePositionWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattlePosition);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 2, 2);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "RectPositionX", _g_get_RectPositionX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "RectPositionZ", _g_get_RectPositionZ);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "RectPositionX", _s_set_RectPositionX);
|
|
||||||
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "RectPositionZ", _s_set_RectPositionZ);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
return LuaAPI.luaL_error(L, "BF.BattlePosition does not have a constructor!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_RectPositionX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
translator.Push(L, BF.BattlePosition.RectPositionX);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_RectPositionZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
translator.Push(L, BF.BattlePosition.RectPositionZ);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_RectPositionX(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
BF.BattlePosition.RectPositionX = (int[])translator.GetObject(L, 1, typeof(int[]));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_RectPositionZ(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
BF.BattlePosition.RectPositionZ = (int[])translator.GetObject(L, 1, typeof(int[]));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,293 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleRewardIconHelperWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleRewardIconHelper);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 4, 3, 3);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowSkill", _m_ShowSkill);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSprite", _m_GetSprite);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowItem", _m_ShowItem);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetOder", _m_SetOder);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "skillBgSprite", _g_get_skillBgSprite);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemBgSprite", _g_get_itemBgSprite);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "iconSprite", _g_get_iconSprite);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "skillBgSprite", _s_set_skillBgSprite);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "itemBgSprite", _s_set_itemBgSprite);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "iconSprite", _s_set_iconSprite);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleRewardIconHelper();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleRewardIconHelper constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_ShowSkill(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleRewardIconHelper gen_to_be_invoked = (BF.BattleRewardIconHelper)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
UnityEngine.Sprite _sprite = (UnityEngine.Sprite)translator.GetObject(L, 2, typeof(UnityEngine.Sprite));
|
|
||||||
|
|
||||||
gen_to_be_invoked.ShowSkill( _sprite );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_GetSprite(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleRewardIconHelper gen_to_be_invoked = (BF.BattleRewardIconHelper)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = gen_to_be_invoked.GetSprite( );
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_ShowItem(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleRewardIconHelper gen_to_be_invoked = (BF.BattleRewardIconHelper)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
UnityEngine.Sprite _sprite = (UnityEngine.Sprite)translator.GetObject(L, 2, typeof(UnityEngine.Sprite));
|
|
||||||
|
|
||||||
gen_to_be_invoked.ShowItem( _sprite );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetOder(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleRewardIconHelper gen_to_be_invoked = (BF.BattleRewardIconHelper)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int _order = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetOder( _order );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_skillBgSprite(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleRewardIconHelper gen_to_be_invoked = (BF.BattleRewardIconHelper)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.skillBgSprite);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_itemBgSprite(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleRewardIconHelper gen_to_be_invoked = (BF.BattleRewardIconHelper)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.itemBgSprite);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_iconSprite(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleRewardIconHelper gen_to_be_invoked = (BF.BattleRewardIconHelper)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.iconSprite);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_skillBgSprite(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleRewardIconHelper gen_to_be_invoked = (BF.BattleRewardIconHelper)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.skillBgSprite = (UnityEngine.SpriteRenderer)translator.GetObject(L, 2, typeof(UnityEngine.SpriteRenderer));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_itemBgSprite(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleRewardIconHelper gen_to_be_invoked = (BF.BattleRewardIconHelper)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.itemBgSprite = (UnityEngine.SpriteRenderer)translator.GetObject(L, 2, typeof(UnityEngine.SpriteRenderer));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_iconSprite(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleRewardIconHelper gen_to_be_invoked = (BF.BattleRewardIconHelper)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.iconSprite = (UnityEngine.SpriteRenderer)translator.GetObject(L, 2, typeof(UnityEngine.SpriteRenderer));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,571 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleSkillToastWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleSkillToast);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 5, 11, 11);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowNormalSkillToast", _m_ShowNormalSkillToast);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowLegacySkillToast", _m_ShowLegacySkillToast);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetEnabled", _m_SetEnabled);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetPause", _m_SetPause);
|
|
||||||
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetResume", _m_SetResume);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "animator", _g_get_animator);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "normalBg", _g_get_normalBg);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "skillAtlas", _g_get_skillAtlas);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "skillIcon", _g_get_skillIcon);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "normalText", _g_get_normalText);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "legacyBg", _g_get_legacyBg);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "legacyAtlas", _g_get_legacyAtlas);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "legacyQltIcon", _g_get_legacyQltIcon);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "legacyIcon", _g_get_legacyIcon);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "legacyText", _g_get_legacyText);
|
|
||||||
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ColorType", _g_get_ColorType);
|
|
||||||
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "animator", _s_set_animator);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "normalBg", _s_set_normalBg);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "skillAtlas", _s_set_skillAtlas);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "skillIcon", _s_set_skillIcon);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "normalText", _s_set_normalText);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "legacyBg", _s_set_legacyBg);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "legacyAtlas", _s_set_legacyAtlas);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "legacyQltIcon", _s_set_legacyQltIcon);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "legacyIcon", _s_set_legacyIcon);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "legacyText", _s_set_legacyText);
|
|
||||||
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ColorType", _s_set_ColorType);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
if(LuaAPI.lua_gettop(L) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
var gen_ret = new BF.BattleSkillToast();
|
|
||||||
translator.Push(L, gen_ret);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleSkillToast constructor!");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_ShowNormalSkillToast(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
string _spriteName = LuaAPI.lua_tostring(L, 2);
|
|
||||||
string _desc = LuaAPI.lua_tostring(L, 3);
|
|
||||||
|
|
||||||
gen_to_be_invoked.ShowNormalSkillToast( _spriteName, _desc );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_ShowLegacySkillToast(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
string _qltName = LuaAPI.lua_tostring(L, 2);
|
|
||||||
string _iconName = LuaAPI.lua_tostring(L, 3);
|
|
||||||
string _desc = LuaAPI.lua_tostring(L, 4);
|
|
||||||
|
|
||||||
gen_to_be_invoked.ShowLegacySkillToast( _qltName, _iconName, _desc );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetEnabled(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
bool _enabled = LuaAPI.lua_toboolean(L, 2);
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetEnabled( _enabled );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetPause(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetPause( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _m_SetResume(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
gen_to_be_invoked.SetResume( );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_animator(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.animator);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_normalBg(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.normalBg);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_skillAtlas(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.skillAtlas);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_skillIcon(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.skillIcon);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_normalText(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.normalText);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_legacyBg(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.legacyBg);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_legacyAtlas(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.legacyAtlas);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_legacyQltIcon(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.legacyQltIcon);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_legacyIcon(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.legacyIcon);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_legacyText(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
translator.Push(L, gen_to_be_invoked.legacyText);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _g_get_ColorType(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ColorType);
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_animator(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.animator = (UnityEngine.Animator)translator.GetObject(L, 2, typeof(UnityEngine.Animator));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_normalBg(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.normalBg = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_skillAtlas(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.skillAtlas = (BF.Atlas)translator.GetObject(L, 2, typeof(BF.Atlas));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_skillIcon(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.skillIcon = (UnityEngine.UI.Image)translator.GetObject(L, 2, typeof(UnityEngine.UI.Image));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_normalText(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.normalText = (TMPro.TextMeshProUGUI)translator.GetObject(L, 2, typeof(TMPro.TextMeshProUGUI));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_legacyBg(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.legacyBg = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_legacyAtlas(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.legacyAtlas = (BF.Atlas)translator.GetObject(L, 2, typeof(BF.Atlas));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_legacyQltIcon(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.legacyQltIcon = (UnityEngine.UI.Image)translator.GetObject(L, 2, typeof(UnityEngine.UI.Image));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_legacyIcon(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.legacyIcon = (UnityEngine.UI.Image)translator.GetObject(L, 2, typeof(UnityEngine.UI.Image));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_legacyText(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.legacyText = (TMPro.TextMeshProUGUI)translator.GetObject(L, 2, typeof(TMPro.TextMeshProUGUI));
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int _s_set_ColorType(RealStatePtr L)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
|
|
||||||
BF.BattleSkillToast gen_to_be_invoked = (BF.BattleSkillToast)translator.FastGetCSObj(L, 1);
|
|
||||||
gen_to_be_invoked.ColorType = LuaAPI.xlua_tointeger(L, 2);
|
|
||||||
|
|
||||||
} catch(System.Exception gen_e) {
|
|
||||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,81 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleTMPNumberWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleTMPNumber);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 15, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PUT_BACK_TIME", BF.BattleTMPNumber.PUT_BACK_TIME);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "dmgNumber2StrDic", BF.BattleTMPNumber.dmgNumber2StrDic);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "dmgAdd", BF.BattleTMPNumber.dmgAdd);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "dmgSub", BF.BattleTMPNumber.dmgSub);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "critNumber2StrDic", BF.BattleTMPNumber.critNumber2StrDic);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "critFlag", BF.BattleTMPNumber.critFlag);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "critAdd", BF.BattleTMPNumber.critAdd);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "critSub", BF.BattleTMPNumber.critSub);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "healNumber2StrDic", BF.BattleTMPNumber.healNumber2StrDic);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "healAdd", BF.BattleTMPNumber.healAdd);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "healSub", BF.BattleTMPNumber.healSub);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "redNumber2StrDic", BF.BattleTMPNumber.redNumber2StrDic);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "redAdd", BF.BattleTMPNumber.redAdd);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "redSub", BF.BattleTMPNumber.redSub);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
return LuaAPI.luaL_error(L, "BF.BattleTMPNumber does not have a constructor!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,71 +0,0 @@
|
|||||||
#if USE_UNI_LUA
|
|
||||||
using LuaAPI = UniLua.Lua;
|
|
||||||
using RealStatePtr = UniLua.ILuaState;
|
|
||||||
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
||||||
#else
|
|
||||||
using LuaAPI = XLua.LuaDLL.Lua;
|
|
||||||
using RealStatePtr = System.IntPtr;
|
|
||||||
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using XLua;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
|
||||||
namespace XLua.CSObjectWrap
|
|
||||||
{
|
|
||||||
using Utils = XLua.Utils;
|
|
||||||
public class BFBattleUnitTypeWrap
|
|
||||||
{
|
|
||||||
public static void __Register(RealStatePtr L)
|
|
||||||
{
|
|
||||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
||||||
System.Type type = typeof(BF.BattleUnitType);
|
|
||||||
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
Utils.BeginClassRegister(type, L, __CreateInstance, 5, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "NORMAL", BF.BattleUnitType.NORMAL);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ELITE", BF.BattleUnitType.ELITE);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BOSS", BF.BattleUnitType.BOSS);
|
|
||||||
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "HERO", BF.BattleUnitType.HERO);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Utils.EndClassRegister(type, L, translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
||||||
static int __CreateInstance(RealStatePtr L)
|
|
||||||
{
|
|
||||||
return LuaAPI.luaL_error(L, "BF.BattleUnitType does not have a constructor!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1220,42 +1220,6 @@ namespace XLua.CSObjectWrap
|
|||||||
translator.DelayWrapLoader(typeof(BF.BIReport), BFBIReportWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.BIReport), BFBIReportWrap.__Register);
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleConfigure), BFBattleConfigureWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleUnitType), BFBattleUnitTypeWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleConst), BFBattleConstWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattlePosition), BFBattlePositionWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleTMPNumber), BFBattleTMPNumberWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleHelper), BFBattleHelperWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleManager), BFBattleManagerWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleMonsterData), BFBattleMonsterDataWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattlePetData), BFBattlePetDataWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattlePool), BFBattlePoolWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleSkillData), BFBattleSkillDataWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleUnitData), BFBattleUnitDataWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BFEvent), BFBFEventWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.BFEvent), BFBFEventWrap.__Register);
|
||||||
|
|
||||||
|
|
||||||
@ -1273,10 +1237,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.GameLaunchProcessorBase), BFGameLaunchProcessorBaseWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.GameLaunchProcessorBase), BFGameLaunchProcessorBaseWrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit8(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.LaunchRequester), BFLaunchRequesterWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.LaunchRequester), BFLaunchRequesterWrap.__Register);
|
||||||
|
|
||||||
@ -1313,6 +1273,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.LocalData), BFLocalDataWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.LocalData), BFLocalDataWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit8(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BFLog), BFBFLogWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.BFLog), BFBFLogWrap.__Register);
|
||||||
|
|
||||||
@ -1430,10 +1394,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.SDKManager), BFSDKManagerWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.SDKManager), BFSDKManagerWrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit9(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.SafeAreaManager), BFSafeAreaManagerWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.SafeAreaManager), BFSafeAreaManagerWrap.__Register);
|
||||||
|
|
||||||
@ -1470,6 +1430,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.Delayed), BFDelayedWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.Delayed), BFDelayedWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit9(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.TaskManager), BFTaskManagerWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.TaskManager), BFTaskManagerWrap.__Register);
|
||||||
|
|
||||||
@ -1492,63 +1456,6 @@ namespace XLua.CSObjectWrap
|
|||||||
translator.DelayWrapLoader(typeof(BF.BFTouchManager), BFBFTouchManagerWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.BFTouchManager), BFBFTouchManagerWrap.__Register);
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlBase), BFBattleControlBaseWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlBoxBullet), BFBattleControlBoxBulletWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlBoxCollider), BFBattleControlBoxColliderWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlBullet), BFBattleControlBulletWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleContinuousTarget), BFBattleContinuousTargetWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlCollider), BFBattleControlColliderWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlColliderContainer), BFBattleControlColliderContainerWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlHero), BFBattleControlHeroWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlMonster), BFBattleControlMonsterWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlMonsterExtend), BFBattleControlMonsterExtendWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlSphereBullet), BFBattleControlSphereBulletWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlSphereCollider), BFBattleControlSphereColliderWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlUnit), BFBattleControlUnitWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlWarning), BFBattleControlWarningWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleControlWarningCollider), BFBattleControlWarningColliderWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleEffectNumber), BFBattleEffectNumberWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleHpBar), BFBattleHpBarWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleRewardIconHelper), BFBattleRewardIconHelperWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleSkillToast), BFBattleSkillToastWrap.__Register);
|
|
||||||
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BattleUnitAttr), BFBattleUnitAttrWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.BattleUnitAttr), BFBattleUnitAttrWrap.__Register);
|
||||||
|
|
||||||
|
|
||||||
@ -1587,10 +1494,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.PrefabHelper), BFPrefabHelperWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.PrefabHelper), BFPrefabHelperWrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit10(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.ShowDebugText), BFShowDebugTextWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.ShowDebugText), BFShowDebugTextWrap.__Register);
|
||||||
|
|
||||||
@ -1684,6 +1587,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BFScrollRectCommon), BFBFScrollRectCommonWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.BFScrollRectCommon), BFBFScrollRectCommonWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit10(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BFScrollRectGrid), BFBFScrollRectGridWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.BFScrollRectGrid), BFBFScrollRectGridWrap.__Register);
|
||||||
|
|
||||||
@ -1744,10 +1651,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.UIDynamicShinyEffect), BFUIDynamicShinyEffectWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.UIDynamicShinyEffect), BFUIDynamicShinyEffectWrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit11(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BF.BFGraphicFlip), BFBFGraphicFlipWrap.__Register);
|
translator.DelayWrapLoader(typeof(BF.BFGraphicFlip), BFBFGraphicFlipWrap.__Register);
|
||||||
|
|
||||||
@ -1841,6 +1744,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(TMPro.TMP_Character), TMProTMP_CharacterWrap.__Register);
|
translator.DelayWrapLoader(typeof(TMPro.TMP_Character), TMProTMP_CharacterWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit11(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(TMPro.TMP_Vertex), TMProTMP_VertexWrap.__Register);
|
translator.DelayWrapLoader(typeof(TMPro.TMP_Vertex), TMProTMP_VertexWrap.__Register);
|
||||||
|
|
||||||
@ -1901,10 +1808,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(TMPro.TMP_FontFeatureTable), TMProTMP_FontFeatureTableWrap.__Register);
|
translator.DelayWrapLoader(typeof(TMPro.TMP_FontFeatureTable), TMProTMP_FontFeatureTableWrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit12(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(TMPro.TMP_GlyphValueRecord), TMProTMP_GlyphValueRecordWrap.__Register);
|
translator.DelayWrapLoader(typeof(TMPro.TMP_GlyphValueRecord), TMProTMP_GlyphValueRecordWrap.__Register);
|
||||||
|
|
||||||
@ -1998,6 +1901,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(TMPro.TMP_UpdateManager), TMProTMP_UpdateManagerWrap.__Register);
|
translator.DelayWrapLoader(typeof(TMPro.TMP_UpdateManager), TMProTMP_UpdateManagerWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit12(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(TMPro.TMP_UpdateRegistry), TMProTMP_UpdateRegistryWrap.__Register);
|
translator.DelayWrapLoader(typeof(TMPro.TMP_UpdateRegistry), TMProTMP_UpdateRegistryWrap.__Register);
|
||||||
|
|
||||||
@ -2058,10 +1965,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(TMPro.TMP_InputField.SubmitEvent), TMProTMP_InputFieldSubmitEventWrap.__Register);
|
translator.DelayWrapLoader(typeof(TMPro.TMP_InputField.SubmitEvent), TMProTMP_InputFieldSubmitEventWrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit13(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(TMPro.TMP_InputField.OnChangeEvent), TMProTMP_InputFieldOnChangeEventWrap.__Register);
|
translator.DelayWrapLoader(typeof(TMPro.TMP_InputField.OnChangeEvent), TMProTMP_InputFieldOnChangeEventWrap.__Register);
|
||||||
|
|
||||||
@ -2155,6 +2058,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(UnityEngine.UI.MaskUtilities), UnityEngineUIMaskUtilitiesWrap.__Register);
|
translator.DelayWrapLoader(typeof(UnityEngine.UI.MaskUtilities), UnityEngineUIMaskUtilitiesWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit13(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(UnityEngine.UI.MaskableGraphic), UnityEngineUIMaskableGraphicWrap.__Register);
|
translator.DelayWrapLoader(typeof(UnityEngine.UI.MaskableGraphic), UnityEngineUIMaskableGraphicWrap.__Register);
|
||||||
|
|
||||||
@ -2215,10 +2122,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(UnityEngine.UI.Dropdown.OptionData), UnityEngineUIDropdownOptionDataWrap.__Register);
|
translator.DelayWrapLoader(typeof(UnityEngine.UI.Dropdown.OptionData), UnityEngineUIDropdownOptionDataWrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit14(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(UnityEngine.UI.Dropdown.OptionDataList), UnityEngineUIDropdownOptionDataListWrap.__Register);
|
translator.DelayWrapLoader(typeof(UnityEngine.UI.Dropdown.OptionDataList), UnityEngineUIDropdownOptionDataListWrap.__Register);
|
||||||
|
|
||||||
@ -2312,6 +2215,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(AFInAppEventType), AFInAppEventTypeWrap.__Register);
|
translator.DelayWrapLoader(typeof(AFInAppEventType), AFInAppEventTypeWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit14(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(AdManager), AdManagerWrap.__Register);
|
translator.DelayWrapLoader(typeof(AdManager), AdManagerWrap.__Register);
|
||||||
|
|
||||||
@ -2372,10 +2279,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(FBWindowsExampleTabsManager), FBWindowsExampleTabsManagerWrap.__Register);
|
translator.DelayWrapLoader(typeof(FBWindowsExampleTabsManager), FBWindowsExampleTabsManagerWrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit15(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(FBWindowsFriendsManager), FBWindowsFriendsManagerWrap.__Register);
|
translator.DelayWrapLoader(typeof(FBWindowsFriendsManager), FBWindowsFriendsManagerWrap.__Register);
|
||||||
|
|
||||||
@ -2469,6 +2372,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(IronSourceEvents), IronSourceEventsWrap.__Register);
|
translator.DelayWrapLoader(typeof(IronSourceEvents), IronSourceEventsWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit15(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(IronSourceEventsDispatcher), IronSourceEventsDispatcherWrap.__Register);
|
translator.DelayWrapLoader(typeof(IronSourceEventsDispatcher), IronSourceEventsDispatcherWrap.__Register);
|
||||||
|
|
||||||
@ -2529,10 +2436,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(LuaAsset), LuaAssetWrap.__Register);
|
translator.DelayWrapLoader(typeof(LuaAsset), LuaAssetWrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit16(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(Security.XXTEA), SecurityXXTEAWrap.__Register);
|
translator.DelayWrapLoader(typeof(Security.XXTEA), SecurityXXTEAWrap.__Register);
|
||||||
|
|
||||||
@ -2626,6 +2529,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustSessionSuccess), comadjustsdkAdjustSessionSuccessWrap.__Register);
|
translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustSessionSuccess), comadjustsdkAdjustSessionSuccessWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit16(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustThirdPartySharing), comadjustsdkAdjustThirdPartySharingWrap.__Register);
|
translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustThirdPartySharing), comadjustsdkAdjustThirdPartySharingWrap.__Register);
|
||||||
|
|
||||||
@ -2686,10 +2593,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(object), SystemObjectWrap.__Register);
|
translator.DelayWrapLoader(typeof(object), SystemObjectWrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit17(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(System.ValueType), SystemValueTypeWrap.__Register);
|
translator.DelayWrapLoader(typeof(System.ValueType), SystemValueTypeWrap.__Register);
|
||||||
|
|
||||||
@ -2783,6 +2686,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(UnityEngine.RenderTextureFormat), UnityEngineRenderTextureFormatWrap.__Register);
|
translator.DelayWrapLoader(typeof(UnityEngine.RenderTextureFormat), UnityEngineRenderTextureFormatWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit17(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(UnityEngine.RenderTextureReadWrite), UnityEngineRenderTextureReadWriteWrap.__Register);
|
translator.DelayWrapLoader(typeof(UnityEngine.RenderTextureReadWrite), UnityEngineRenderTextureReadWriteWrap.__Register);
|
||||||
|
|
||||||
@ -2843,10 +2750,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(UnityEngine.Events.UnityEvent<long>), UnityEngineEventsUnityEvent_1_SystemInt64_Wrap.__Register);
|
translator.DelayWrapLoader(typeof(UnityEngine.Events.UnityEvent<long>), UnityEngineEventsUnityEvent_1_SystemInt64_Wrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit18(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(UnityEngine.Events.UnityEventBase), UnityEngineEventsUnityEventBaseWrap.__Register);
|
translator.DelayWrapLoader(typeof(UnityEngine.Events.UnityEventBase), UnityEngineEventsUnityEventBaseWrap.__Register);
|
||||||
|
|
||||||
@ -2940,6 +2843,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(UnityEngine.UI.Toggle.ToggleTransition), UnityEngineUIToggleToggleTransitionWrap.__Register);
|
translator.DelayWrapLoader(typeof(UnityEngine.UI.Toggle.ToggleTransition), UnityEngineUIToggleToggleTransitionWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit18(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(UnityEngine.UI.GridLayoutGroup.Corner), UnityEngineUIGridLayoutGroupCornerWrap.__Register);
|
translator.DelayWrapLoader(typeof(UnityEngine.UI.GridLayoutGroup.Corner), UnityEngineUIGridLayoutGroupCornerWrap.__Register);
|
||||||
|
|
||||||
@ -3000,10 +2907,6 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(Spine.Unity.SkeletonRenderer.SpriteMaskInteractionMaterials), SpineUnitySkeletonRendererSpriteMaskInteractionMaterialsWrap.__Register);
|
translator.DelayWrapLoader(typeof(Spine.Unity.SkeletonRenderer.SpriteMaskInteractionMaterials), SpineUnitySkeletonRendererSpriteMaskInteractionMaterialsWrap.__Register);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wrapInit19(LuaEnv luaenv, ObjectTranslator translator)
|
|
||||||
{
|
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(Spine.Unity.BoneFollower), SpineUnityBoneFollowerWrap.__Register);
|
translator.DelayWrapLoader(typeof(Spine.Unity.BoneFollower), SpineUnityBoneFollowerWrap.__Register);
|
||||||
|
|
||||||
@ -3097,6 +3000,10 @@ namespace XLua.CSObjectWrap
|
|||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BestHTTP.HTTPResponse), BestHTTPHTTPResponseWrap.__Register);
|
translator.DelayWrapLoader(typeof(BestHTTP.HTTPResponse), BestHTTPHTTPResponseWrap.__Register);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wrapInit19(LuaEnv luaenv, ObjectTranslator translator)
|
||||||
|
{
|
||||||
|
|
||||||
translator.DelayWrapLoader(typeof(BestHTTP.Forms.HTTPUrlEncodedForm), BestHTTPFormsHTTPUrlEncodedFormWrap.__Register);
|
translator.DelayWrapLoader(typeof(BestHTTP.Forms.HTTPUrlEncodedForm), BestHTTPFormsHTTPUrlEncodedFormWrap.__Register);
|
||||||
|
|
||||||
|
|||||||
@ -16,18 +16,6 @@
|
|||||||
<type fullname="BF.BFMain" preserve="all"/>
|
<type fullname="BF.BFMain" preserve="all"/>
|
||||||
<type fullname="BF.BFWebRequestManager" preserve="all"/>
|
<type fullname="BF.BFWebRequestManager" preserve="all"/>
|
||||||
<type fullname="BF.BIReport" preserve="all"/>
|
<type fullname="BF.BIReport" preserve="all"/>
|
||||||
<type fullname="BF.BattleConfigure" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleUnitType" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleConst" preserve="all"/>
|
|
||||||
<type fullname="BF.BattlePosition" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleTMPNumber" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleHelper" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleManager" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleMonsterData" preserve="all"/>
|
|
||||||
<type fullname="BF.BattlePetData" preserve="all"/>
|
|
||||||
<type fullname="BF.BattlePool" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleSkillData" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleUnitData" preserve="all"/>
|
|
||||||
<type fullname="BF.BFEvent" preserve="all"/>
|
<type fullname="BF.BFEvent" preserve="all"/>
|
||||||
<type fullname="BF.BFEventBase" preserve="all"/>
|
<type fullname="BF.BFEventBase" preserve="all"/>
|
||||||
<type fullname="BF.BFVersionInfo" preserve="all"/>
|
<type fullname="BF.BFVersionInfo" preserve="all"/>
|
||||||
@ -104,25 +92,6 @@
|
|||||||
<type fullname="BF.BFFingerSnapshot" preserve="all"/>
|
<type fullname="BF.BFFingerSnapshot" preserve="all"/>
|
||||||
<type fullname="BF.BFGesture" preserve="all"/>
|
<type fullname="BF.BFGesture" preserve="all"/>
|
||||||
<type fullname="BF.BFTouchManager" preserve="all"/>
|
<type fullname="BF.BFTouchManager" preserve="all"/>
|
||||||
<type fullname="BF.BattleControlBase" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlBoxBullet" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlBoxCollider" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlBullet" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleContinuousTarget" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlCollider" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlColliderContainer" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlHero" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlMonster" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlMonsterExtend" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlSphereBullet" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlSphereCollider" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlUnit" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlWarning" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleControlWarningCollider" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleEffectNumber" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleHpBar" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleRewardIconHelper" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleSkillToast" preserve="all"/>
|
|
||||||
<type fullname="BF.BattleUnitAttr" preserve="all"/>
|
<type fullname="BF.BattleUnitAttr" preserve="all"/>
|
||||||
<type fullname="BF.BaseSortingOrderHelper" preserve="all"/>
|
<type fullname="BF.BaseSortingOrderHelper" preserve="all"/>
|
||||||
<type fullname="BF.CameraHelper" preserve="all"/>
|
<type fullname="BF.CameraHelper" preserve="all"/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user