// { PreCnt = preCnt, active = { Count = 0 }, deactive = { Count = 0 } } public void groupActionBegin(LuaTable actionParams, int count) { if (count <= 0) { return; } FastMoveManager.RenderIndex = FastMoveManager.RenderIndex + 1; LuaTable act = null; for (int i = 1; i <= count; i++) { act = (LuaTable)actionParams[i]; FastMove a1 = act.toObject(1) as FastMove; //act[1] as FastMove; int a2 = act.toInt32(2); //(int)((double)act[2]); float a3 = act.toFloat(3); //(float)((double)act[3]); float a4 = act.toFloat(4); //(float)((double)act[4]); float a5 = act.toFloat(5); //(float)((double)act[5]); float a6 = act.toFloat(6); //(float)((double)act[6]); float a7 = act.toFloat(7); //(float)((double)act[7]); float a8 = act.toFloat(8); //(float)((double)act[8]); int a9 = act.toInt32(9); //(int)((double)act[9]); int a10 = act.toInt32(10); // (int)((double)act[10]); bool a11 = act.toBool(11); // (bool)act[11]; bool a12 = act.toBool(12); actionBegin(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); } }
static public int set_OnOtherEvent(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); FastAction.FastMove.OnMoveEvent v; int op = LuaDelegation.checkDelegate(l, 2, out v); if (op == 0) { self.OnOtherEvent = v; } else if (op == 1) { self.OnOtherEvent += v; } else if (op == 2) { self.OnOtherEvent -= v; } pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
public void actionBegin(FastMove fm, int renderQueue, float startX, float startY, float startZ, float endX, float endY, float endZ, int duration, int delay, bool world, bool noEvt) { if (fm == null) { return; } fm.SetParams(duration, delay, world, noEvt); if (renderQueue != 9999) { fm.SetRenderQ(renderQueue); } if (startX != 9999 && startY != 9999 && startZ != 9999) { fm.SetStartPos(startX, startY, startZ); } else { fm.SetStartPos(); } fm.SetEndPos(endX, endY, endZ); Begin(fm); }
public void Begin(FastMove fMove) { if (_firstFastMove == null) { _firstFastMove = fMove; _firstFastMove.Previous = null; _firstFastMove.Next = null; _currentFastMove = _firstFastMove; _endFastMove = _firstFastMove; } else { // 已经在链表中,不做处理 if (_firstFastMove == fMove || _endFastMove == fMove || (fMove.Previous != null && fMove.Next != null)) { return; } _endFastMove.Next = fMove; fMove.Previous = _endFastMove; _endFastMove = fMove; } fMove.Prepare(); _listCount += 1; }
static public int SetEndPos(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 1) { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); self.SetEndPos(); pushValue(l, true); return(1); } else if (argc == 4) { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); System.Single a1; checkType(l, 2, out a1); System.Single a2; checkType(l, 3, out a2); System.Single a3; checkType(l, 4, out a3); self.SetEndPos(a1, a2, a3); pushValue(l, true); return(1); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
void OnDestroy() { if (name != 0) { //Debug.Log(name + " is Destory"); } OnDefaultEvent = null; OnOtherEvent = null; Next = null; Previous = null; _mat = null; }
static public int get_time(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); pushValue(l, true); pushValue(l, self.time); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int SetPositionToStartPos(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); self.SetPositionToStartPos(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int Prepare(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); self.Prepare(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
private bool beginNext() { if (_currentFastMove.Next != null) { _currentFastMove = _currentFastMove.Next; return(false); } else { _currentFastMove = _firstFastMove; return(true); } }
void OnDestroy() { if (_firstFastMove != null) { _firstFastMove.Clean(); } _firstFastMove = null; _currentFastMove = null; _endFastMove = null; _tempFastMove = null; _listCount = 0; CancelInvoke(); }
static public int SetRenderQ(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); System.Int32 a1; checkType(l, 2, out a1); self.SetRenderQ(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_time(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); System.Double v; checkType(l, 2, out v); self.time = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set__doingAction(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); System.Boolean v; checkType(l, 2, out v); self._doingAction = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_EndPos(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); UnityEngine.Vector3 v; checkType(l, 2, out v); self.EndPos = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_Previous(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); FastAction.FastMove v; checkType(l, 2, out v); self.Previous = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int SetOtherCall(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); FastAction.FastMove.OnMoveEvent a1; LuaDelegation.checkDelegate(l, 2, out a1); self.SetOtherCall(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int Doing(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); System.Single a1; checkType(l, 2, out a1); var ret = self.Doing(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int SetParams(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); System.Int32 a1; checkType(l, 2, out a1); System.Int32 a2; checkType(l, 3, out a2); System.Boolean a3; checkType(l, 4, out a3); System.Boolean a4; checkType(l, 5, out a4); self.SetParams(a1, a2, a3, a4); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
public void Clear() { Next = null; Previous = null; }
private bool stopCurrent() { if (_currentFastMove != null && _currentFastMove.Previous == null) { // 前后都没有对象,列表最后一个执行完毕 if (_currentFastMove.Next == null) { if (_firstFastMove != null) { _firstFastMove.Clear(); } if (_endFastMove != null) { _endFastMove.Clear(); } if (_currentFastMove != null) { _currentFastMove.Clear(); } _firstFastMove = null; _endFastMove = null; _currentFastMove = null; _listCount = 0; //Debug.LogError("1"); return(true); } else // 第一个对象执行完,后置有对象 { if (_firstFastMove != null) { _firstFastMove = _currentFastMove.Next; _firstFastMove.Previous = null; _currentFastMove.Clear(); _currentFastMove = _firstFastMove; } //Debug.LogError("2"); } } else { // 执行到最后一个对象 if (_currentFastMove.Next == null) { _endFastMove = _currentFastMove.Previous; _endFastMove.Next = null; _currentFastMove.Clear(); _currentFastMove = _firstFastMove; //Debug.LogError("3"); _listCount -= 1; return(true); } else // 继续执行下一个对象 { _tempFastMove = _currentFastMove.Next; _tempFastMove.Previous = _currentFastMove.Previous; _tempFastMove.Previous.Next = _tempFastMove; _currentFastMove.Clear(); _currentFastMove = _tempFastMove; _tempFastMove = null; //Debug.LogError("4"); } } _listCount -= 1; return(false); }