private void SetStrongpointState(StrongPoint sp, eStrongpointState state, int camp) { sp.State = state; var now = DateTime.Now; var time = sp.Timer == null ? 0f : (OccupyTime - (float)(sp.Timer.Time - now).TotalSeconds); PushActionToAllPlayer(p => { p.Proxy.NotifyStrongpointStateChanged(camp, sp.Index, (int)state, time); }); }
private void SetStrongpointState(int index, eStrongpointState state) { var point = Strongpoints[index]; point.State = state; //如果是占领中则归属设置为正在占领方 否则设置成当前占领方 var camp = state == eStrongpointState.Occupying ? point.FightingSide : point.OwnerSide; camp += CampBegin; PushActionToAllPlayer( p => { p.Proxy.NotifyStrongpointStateChanged(camp, index, (int)state, point.OccupyTimer); }); }