public void ShowEffect(FreeRenderObject effect, int currentTime, int totalTime) { if (currentTime < totalTime || totalTime <= 0) { effect.Visible = true; } else { effect.Visible = false; } }
public override void SingleExecute(FreeMoveEntity freeMove) { SimpleProto data = SingletonManager.Get <FreeEffectManager>().GetEffectData(freeMove.freeData.Key); if (data != null) { data.Ss[0] = "freemove_" + freeMove.entityKey.Value.EntityId; SimpleMessageManager.Instance.DoHandle(FreeMessageConstant.MSG_EFFECT_CREATE, data); FreeRenderObject effect = SingletonManager.Get <FreeEffectManager>().GetEffect(data.Ss[0]); if (effect != null) { effect.Move(freeMove.position.Value.x, freeMove.position.Value.y, freeMove.position.Value.z); } } }
private void UpdatePlaine() { AirPlaneData planeData = SingletonManager.Get <FreeUiManager>().Contexts1.ui.map.PlaneData; if (planeData == null) { planeData = new AirPlaneData(1, new MapFixedVector3(0, 0, 0), 0); SingletonManager.Get <FreeUiManager>().Contexts1.ui.map.PlaneData = planeData; } FreeRenderObject plane = SingletonManager.Get <FreeEffectManager>().GetEffect("plane"); if (plane == null) { plane = SingletonManager.Get <FreeEffectManager>().GetEffect("plane1"); if (plane != null) { planeData.Type = 1; // planeData.Pos = new Vector2(plane.model3D.x - leftMinPos.x, plane.model3D.z - leftMinPos.z); var worldPos = WorldOrigin.WorldPosition(new Vector3(plane.model3D.x, plane.model3D.y, plane.model3D.z)); planeData.Pos = new MapFixedVector3(worldPos); planeData.Direction = -plane.GetEffect(0).EffectModel3D.model3D.rotationY; } } else { planeData.Type = 2; // planeData.Pos = new Vector2(plane.model3D.x - leftMinPos.x, plane.model3D.z - leftMinPos.z); var worldPos = WorldOrigin.WorldPosition(new Vector3(plane.model3D.x, plane.model3D.y, plane.model3D.z)); planeData.Pos = new MapFixedVector3(worldPos); planeData.Direction = -plane.GetEffect(0).EffectModel3D.model3D.rotationY; } if (plane == null) { planeData.Type = 0; planeData.Pos = new MapFixedVector3(0, 0, 0); planeData.Direction = 0; } }
public List <MapFixedVector2> KongTouList() { int planeId = 0; kongTouList.Clear(); FreeRenderObject plane = SingletonManager.Get <FreeEffectManager>().GetEffect("plane1"); if (plane != null) { IAutoValue id = plane.GetAuto("id"); if (id != null && id is AutoConstValue) { planeId = int.Parse(((AutoConstValue)id).GetValue()); foreach (FreeRenderObject drop in SingletonManager.Get <FreeEffectManager>().FreeEffects.Values) { if (drop.key.StartsWith("dropBox")) { IAutoValue dropBoxId = drop.GetAuto("id"); if (dropBoxId != null && dropBoxId is AutoConstValue) { int realId = int.Parse(((AutoConstValue)dropBoxId).GetValue()); if (realId == planeId) { kongTouList.Add(new MapFixedVector2(WorldOrigin.WorldPosition(new Vector3(drop.model3D.x, drop.model3D.y, drop.model3D.z)).To2D())); } // Debug.LogFormat("********************************** planeId:{0} dropId:{1}", planeId, realId); } } } } } return(kongTouList); }