public void trackArrive() { AppEngine canvas = AppEngine.getCanvas(); SceneGame sceneGame = canvas.getSceneGame(); if (sceneGame.isMapMode()) { this.m_location = 2; this.trackGotoTown(); } else if (sceneGame.isZoomMapMode()) { this.m_location = 1; this.m_locationMap = canvas.getNextZoomMapId(); switch (this.m_locationMap) { case 4: SpywareManager.getInstance().trackGotoLakeside(); break; case 183: SpywareManager.getInstance().trackGotoStreetside(); break; } } else { if (!sceneGame.isHouseMode()) { return; } this.m_location = 0; this.m_locationMap = canvas.getNextHouseId(); this.trackGotoHouse(this.m_locationMap); } }
public void render(Graphics g) { this.setup(); AppEngine canvas = AppEngine.getCanvas(); AnimationManager2D animationManager2D = canvas.getAnimationManager2D(); float halfWidth = (float)canvas.getHalfWidth(); float halfHeight = (float)canvas.getHalfHeight(); animationManager2D.submitAnim(175, halfWidth, halfHeight); if (this.m_dotIndex >= 0 && this.m_dotIndex < 7) { float num = 32f; float x = (float)((double)halfWidth - 108.0 + (double)num * (double)this.m_dotIndex); float y = halfHeight + 128f; animationManager2D.submitAnim(177, x, y); } int x1 = (int)((double)halfWidth - 202.0); int y1 = (int)((double)halfHeight - 95.0); this.getScene().getUIButton(128).submit(ref animationManager2D, x1, y1); bool enabled1 = canvas.getSimData().isTimeForWork((MapObject)null, 0); int x2 = (int)((double)halfWidth + 197.0); int y2 = (int)((double)halfHeight - 48.0); this.getScene().getUIButton(256).submit(ref animationManager2D, x2, y2, enabled1); bool enabled2 = !canvas.getSceneGame().isMapMode(); int x3 = (int)((double)halfWidth + 192.0); int y3 = (int)((double)halfHeight + 32.0); this.getScene().getUIButton(512).submit(ref animationManager2D, x3, y3, enabled2); SceneGame sceneGame = canvas.getSceneGame(); bool enabled3 = sceneGame.isMapMode() || sceneGame.isZoomMapMode(); int x4 = (int)((double)halfWidth + 186.0); int y4 = (int)((double)halfHeight + 78.0); this.getScene().getUIButton(1024).submit(ref animationManager2D, x4, y4, enabled3); if (this.m_subType == -1) { if (this.itemsLeft()) { float x5 = halfWidth - 185f; float y5 = halfHeight; animationManager2D.submitAnim(178, x5, y5); } if (this.itemsRight()) { float x5 = halfWidth + 163f; float y5 = halfHeight; animationManager2D.submitAnim(179, x5, y5); } } if (this.m_subType != -1) { float x5 = halfWidth - 188f; float y5 = halfHeight + 17f; animationManager2D.submitAnim(176, x5, y5); float num1 = x5; float num2 = y5 - 16f; this.getScene().getUIButton(1048576).submit(ref animationManager2D, (int)num1, (int)num2); } animationManager2D.flushAnims(g); g.Begin(); int x6 = (int)((double)halfWidth - 15.0); int y6 = (int)((double)halfHeight - 118.0); canvas.getTextManager().drawString(g, this.m_titleId, 6, x6, y6, 18); g.End(); int num3 = (int)((double)halfWidth - 165.0 - 11.0); int y7 = (int)((double)halfHeight - 95.0 + 14.0); if (this.m_subType != -1) { int x5 = num3 + 15; this.renderContents(g, this.m_subType, x5, y7, 315, 190); } else { this.setDragArea(num3, y7, 330, 190); int clipX = g.getClipX(); int clipY = g.getClipY(); int clipWidth = g.getClipWidth(); int clipHeight = g.getClipHeight(); g.setClip(320 - y7 - 190, num3, 190, 330); int swipeOffset = (int)this.getSwipeOffset(); int num1 = swipeOffset + this.m_type * 330; int x5 = num3 + num1; this.renderContents(g, this.m_type, x5, y7, 330, 190); float swipeNotchOffset = this.getSwipeNotchOffset(this.getSwipeOffset()); if ((double)swipeOffset != (double)swipeNotchOffset) { int type = this.m_screenLeft; int num2 = -330; if ((double)swipeOffset < (double)swipeNotchOffset) { type = this.m_screenRight; num2 = 330; } if (type != -1) { int x7 = num3 + num2 + num1; this.renderContents(g, type, x7, y7, 330, 190); } } g.setClip(clipX, clipY, clipWidth, clipHeight); } }