Exemple #1
0
        public static void HandleFrameAction()
        {
            SyncEvent e = Get();

            e.type = SyncEventType.SET_FRAME_ACTION;
            e.BeginInvoke();
        }
Exemple #2
0
        public static void DestroyBattle()
        {
            SyncEvent e = Get();

            e.type = SyncEventType.DESTROY_BATTLE;
            e.BeginInvoke();
        }
Exemple #3
0
 private static void Release(SyncEvent element)
 {
     lock ( LOCK_OBJ )
     {
         POOL.Push(element);
     }
 }
Exemple #4
0
        public static void EntityAddedToBattle(string entityId)
        {
            SyncEvent e = Get();

            e.type     = SyncEventType.ENTITY_ADDED_TO_BATTLE;
            e.targetId = entityId;
            e.BeginInvoke();
        }
Exemple #5
0
        public static void EntityRemoveFromBattle(string entityId)
        {
            SyncEvent e = Get();

            e.type     = SyncEventType.ENTITY_REMOVE_FROM_BATTLE;
            e.targetId = entityId;
            e.BeginInvoke();
        }
Exemple #6
0
        public static void Win(int team)
        {
            SyncEvent e = Get();

            e.type = SyncEventType.WIN;
            e.i0   = team;
            e.BeginInvoke();
        }
Exemple #7
0
        public static void Terminus(string entityId)
        {
            SyncEvent e = Get();

            e.type     = SyncEventType.TERMINUS;
            e.targetId = entityId;
            e.BeginInvoke();
        }
Exemple #8
0
        public static void DestroyBuff(string rid)
        {
            SyncEvent e = Get();

            e.type      = SyncEventType.BUFF_DESTROIED;
            e.genericId = rid;
            e.BeginInvoke();
        }
Exemple #9
0
        public static void UseItem(string targetId, bool result)
        {
            SyncEvent e = Get();

            e.type     = SyncEventType.USE_ITEM;
            e.targetId = targetId;
            e.b0       = result;
            e.BeginInvoke();
        }
Exemple #10
0
        public static void CountDown(int num, int countDown)
        {
            SyncEvent e = Get();

            e.type = SyncEventType.COUNT_DOWN;
            e.i0   = num;
            e.i1   = countDown;
            e.BeginInvoke();
        }
Exemple #11
0
        public static void CreateEntity(string type, EntityParam param)
        {
            SyncEvent e = Get();

            e.type       = SyncEventType.ENTITY_CREATED;
            e.entityType = type;
            e.param      = param;
            e.BeginInvoke();
        }
Exemple #12
0
        public static SyncEvent BeginSyncProps(string targetId)
        {
            SyncEvent e = Get();

            e.type      = SyncEventType.ENTITY_SYNC_PROPS;
            e.attrCount = 0;
            e.targetId  = targetId;
            return(e);
        }
Exemple #13
0
        public static void PickItem(string targetId, string itemId)
        {
            SyncEvent e = Get();

            e.type      = SyncEventType.PICK_ITEM;
            e.targetId  = targetId;
            e.genericId = itemId;
            e.BeginInvoke();
        }
Exemple #14
0
        public static void GenMaze(int[] walkables, int startIndex, int endIndex)
        {
            SyncEvent e = Get();

            e.type      = SyncEventType.GEN_MAZE;
            e.walkables = walkables;
            e.i0        = startIndex;
            e.i1        = endIndex;
            e.BeginInvoke();
        }
Exemple #15
0
        public static void CreateBuff(string buffId, string casterId, string targetId)
        {
            SyncEvent e = Get();

            e.type      = SyncEventType.BUFF_CREATED;
            e.genericId = buffId;
            e.casterId  = casterId;
            e.targetId  = targetId;
            e.BeginInvoke();
        }
Exemple #16
0
        public static void ChangeState(string targetId, FSMStateType type, bool force = false, params object[] param)
        {
            SyncEvent e = Get();

            e.type        = SyncEventType.ENTITY_STATE_CHANGED;
            e.targetId    = targetId;
            e.stateType   = type;
            e.forceChange = force;
            e.stateParam  = param;
            e.BeginInvoke();
        }
Exemple #17
0
        public static void DebugDraw(DebugDrawType type, FVec3 v0, FVec3 v1, Fix64 f, Color4 color)
        {
            SyncEvent e = Get();

            e.type          = SyncEventType.DEBUG_DRAW;
            e.debugDrawType = type;
            e.dv1           = v0;
            e.dv2           = v1;
            e.df            = f;
            e.dc            = color;
            e.BeginInvoke();
        }
Exemple #18
0
 private static void Release(SyncEvent element)
 {
     POOL.Push(element);
 }
Exemple #19
0
 public static void AddSyncProp(SyncEvent e, Attr attr, object value)
 {
     e.attrs[e.attrCount]      = attr;
     e.attrValues[e.attrCount] = value;
     ++e.attrCount;
 }
Exemple #20
0
 public static void EndSyncProps(SyncEvent e)
 {
     e.BeginInvoke();
 }