public FreedomEffect(Type clazz, int count_0, int limit, int x_1, int y_2, int w, int h) { this.visible = true; this.tex2ds = new List<LTexture>(10); this.SetLocation(x_1, y_2); this.width = w; this.height = h; this.count = count_0; this.timer = new LTimer(80); this.kernels = (IKernel[])Arrays.NewInstance(clazz, count_0); try { System.Reflection.ConstructorInfo constructor = JavaRuntime.GetConstructor(clazz, new Type[] { typeof(int), typeof(int), typeof(int) }); for (int i = 0; i < count_0; i++) { int no = MathUtils.Random(0, limit); kernels[i] = (IKernel)JavaRuntime.Invoke(constructor, new Object[] { ((int)(no)), ((int)(w)), ((int)(h)) }); } } catch (Exception e) { Console.Error.WriteLine(e.StackTrace); } }
public MoveObject(float x, float y, float dw, float dh, Animation animation, TileMap map): base(x, y, dw, dh, animation, map) { this.timer = new LTimer(0); this.isComplete = false; this.allDirection = false; this.speed = 4; }
public ArcEffect(LColor c, int x, int y, int width, int height) { this.SetLocation(x, y); this.width = width; this.height = height; this.timer = new LTimer(200); this.color = (c == null) ? LColor.black : c; this.visible = true; }
public ScrollEffect(int d, LTexture tex2d, float x, float y, int w, int h) { this.SetLocation(x, y); this.texture = tex2d; this.width = w; this.height = h; this.count = 1; this.timer = new LTimer(10); this.visible = true; this.code = d; }
public CrossEffect(int c, LTexture o, LTexture n) { this.code = c; this.otexture = o; this.ntexture = n; this.width = o.GetWidth(); this.height = o.GetHeight(); if (width > height) { maxcount = 16; } else { maxcount = 8; } this.timer = new LTimer(160); this.visible = true; }
public Blood(LColor c, int x, int y) { this.SetLocation(x, y); this.color = c; this.timer = new LTimer(20); this.drops = new Drop[20]; this.limit = 50; for (int i = 0; i < drops.Length; ++i) { SetBoolds(i, x, y, 6.0f * (MathUtils.Random() - 0.5f), -2.0f * MathUtils.Random()); } this.xSpeed = 0F; this.ySpeed = 0.5F; this.step = 0; this.visible = true; }
public LSelect(LTexture formImage, int x, int y, int width, int height):base(x, y, width, height) { if (formImage == null) { this.SetBackground(new LTexture(width, height, true, Loon.Core.Graphics.Opengl.LTexture.Format.SPEED)); this.SetAlpha(0.3F); } else { this.SetBackground(formImage); } this.customRendering = true; this.selectFlag = 1; this.tmpOffset = -(width / 10); this.delay = new LTimer(150); this.autoAlpha = 0.25F; this.isAutoAlpha = true; this.SetCursor(XNAConfig.LoadTex(LSystem.FRAMEWORK_IMG_NAME + "creese.png")); this.SetElastic(true); this.SetLocked(true); this.SetLayer(100); }
public SplitEffect(LTexture t, RectBox limit_0, int d) { this.texture = t; this.width = texture.GetWidth(); this.height = texture.GetHeight(); this.halfWidth = width / 2; this.halfHeight = height / 2; this.multiples = 2; this.direction = d; this.limit = limit_0; this.timer = new LTimer(10); this.visible = true; this.v1 = new Vector2f(); this.v2 = new Vector2f(); switch (direction) { case Config.UP: case Config.DOWN: special = true; { v1.Set(0, 0); v2.Set(halfWidth, 0); break; } case Config.TLEFT: case Config.TRIGHT: v1.Set(0, 0); v2.Set(halfWidth, 0); break; case Config.LEFT: case Config.RIGHT: special = true; { v1.Set(0, 0); v2.Set(0, halfHeight); break; } case Config.TUP: case Config.TDOWN: v1.Set(0, 0); v2.Set(0, halfHeight); break; } }
public WaitSprite(int s, int w, int h) { this.style = s; this.wait = new WaitSprite.DrawWait(s, w, h); this.delay = new LTimer(120); this.alpha = 1.0F; this.visible = true; if (s > 1) { int width_0 = w / 2; int height_1 = h / 2; cycle = NewSample(s - 2, width_0, height_1); RectBox limit = cycle.GetCollisionBox(); SetLocation( (w - ((limit.GetWidth() == 0) ? (float)(20) : (float)(limit.GetWidth()))) / 2, (h - ((limit.GetHeight() == 0) ? (float)(20) : (float)(limit.GetHeight()))) / 2); } Update(0); }
public Cycle(List<object[]> path_0, int x_1, int y_2, int w, int h) { if (path_0 != null) { CollectionUtils.Add(data, CollectionUtils.ToArray(path_0)); isUpdate = true; } else { data = new List<object[]>(10); } this.SetLocation(x_1, y_2); this.timer = new LTimer(25); this.color = LColor.white; this.points = new List<CycleProgress>(); this.multiplier = 1; this.pointDistance = 0.05f; this.padding = 0; this.stepType = 0; this.stepsPerFrame = 1; this.trailLength = 1; this.scaleX = 1; this.scaleY = 1; this.alpha = 1; this.blockWidth = w; this.blockHeight = h; this.blockHalfWidth = w / 2; this.blockHalfHeight = h / 2; if (signatures == null) { signatures = new Dictionary<Int32, float[]>(3); CollectionUtils.Put(signatures, ARC, new float[] { 1, 1, 3, 2, 2, 0 }); CollectionUtils.Put(signatures, BEZIER, new float[] { 1, 1, 1, 1, 1, 1, 1, 1 }); CollectionUtils.Put(signatures, LINE, new float[] { 1, 1, 1, 1 }); } this.Setup(); this.isVisible = true; }
public ActionEvent() { timer = new LTimer(0); }
public override void Alter(LTimerContext t) { if (IsWait()) { return; } if (timer1 == null) { timer1 = new LTimer(50); } if (title != null && timer1.Action(t.GetTimeSinceLastUpdate())) { if (title.GetY() > 50) { title.Move_up(8); title.ValidatePosition(); } else if (title.GetAlpha() > 0.2f) { title.SetAlpha(title.GetAlpha() - 0.1f); } else { title.SetVisible(false); Remove(title); title = null; } return; } else if (over != null && timer1.Action(t.GetTimeSinceLastUpdate()) && !overFlag) { if (over.GetY() < (GetHeight() - over.GetHeight()) / 2) { over.Move_down(8); over.ValidatePosition(); } else if (over.GetAlpha() < 1.0f) { over.SetAlpha(over.GetAlpha() + 0.1f); } else { CenterOn(over); overFlag = true; } return; } if (!wingame) { if (timer == null) { timer = new LTimer(100); } if (timer.Action(t.GetTimeSinceLastUpdate())) { if (progress != null) { progress.SetUpdate(progress.GetValue() - (stageNo*30)); if (progress.GetValue() <= 100 && !failgame) { failgame = true; GetSprites().SetVisible(false); over = new LPaper(GetImage(16), 0, 0); over.Click = new OverClick(); over.SetAlpha(0.1f); CenterOn(over); over.SetY(0); Add(over); } } } } else { wingame = false; RemoveAll(); Stage(stageNo + 1); } }