// Use this for initialization private void Start() { //_baseCubeTexture = Resources.Load<Texture2D>("Textures/block_circle"); //_baseCubeMaterial = Resources.Load<Material>("Materials/base"); //gameObject.GetComponent<Renderer>().material.mainTexture = new Texture2D(128, 128); //gameObject.GetComponent<Renderer>().material = new Material(_baseCubeMaterial){ // color = Color.white, // mainTexture = new Texture2D(500,500), //}; //gameObject.GetComponent<Renderer>().material.DOColor(Color.green, 10); var menuBlock1 = MenuBlock.createMenuBlock(new MenuBlock.ButtonConfig("This is some text", 0, 0.5f), transform); var menuBlock2 = MenuBlock.createMenuBlock(new MenuBlock.ButtonConfig("Some More Text", 0, 0), transform); var menuBlock3 = MenuBlock.createMenuBlock(new MenuBlock.ButtonConfig("Even More Text", 0, -0.5f), transform); transform.localScale = Vector3.zero; transform.position = new Vector3(0, 7, 0); transform.rotation = Quaternion.Euler(180, -270, 0); transform.DOMove(menuPosition, 2).SetEase(Ease.InOutExpo); transform.DOScale(Vector3.one, 2).SetEase(Ease.InOutExpo); transform.DORotate(Vector3.zero, 2).SetEase(Ease.InOutExpo); //InvokeRepeating ("flip", 0, 2); }
public static (int x, int y, int z) GetInlineButton(this MenuBlock block, string callName) { for (int k = 0; k < block.Length; k++) { InlineMenu menu = block[k] as InlineMenu; var pos = menu.GetButton(callName); if (pos.x != -1 && pos.y != -1) { return(k, pos.x, pos.y); } } return(-1, -1, -1); }
public Game(Area[] areas, int currentArea = 0, Player player = null) { Doors.CreateDoors(); if (player == null) { player = new Player("Unknown", new Inventory(10)); } AreaBlock = new AreaBlock(areas, currentArea); InventoryBlock = new InventoryBlock(player.Inventory); DialogBlock = new DialogBlock(); MenuBlock = new MenuBlock(); PlayerStateBlock = new PlayerStateBlock(player); TickHandler = new TickHandler(this, 41); }
void ReleaseDesignerOutlets() { if (BottomConstraint != null) { BottomConstraint.Dispose(); BottomConstraint = null; } if (ChatEditMessage != null) { ChatEditMessage.Dispose(); ChatEditMessage = null; } if (ChatEditMessageContainer != null) { ChatEditMessageContainer.Dispose(); ChatEditMessageContainer = null; } if (ChatMessageWindow != null) { ChatMessageWindow.Dispose(); ChatMessageWindow = null; } if (ChatOneBack != null) { ChatOneBack.Dispose(); ChatOneBack = null; } if (ChatOneLeftConstraint != null) { ChatOneLeftConstraint.Dispose(); ChatOneLeftConstraint = null; } if (ChatOneRightConstraint != null) { ChatOneRightConstraint.Dispose(); ChatOneRightConstraint = null; } if (ChatSendMessage != null) { ChatSendMessage.Dispose(); ChatSendMessage = null; } if (ChatTargetImage != null) { ChatTargetImage.Dispose(); ChatTargetImage = null; } if (ChatViewProfile != null) { ChatViewProfile.Dispose(); ChatViewProfile = null; } if (MatchDate != null) { MatchDate.Dispose(); MatchDate = null; } if (MenuBlock != null) { MenuBlock.Dispose(); MenuBlock = null; } if (MenuContainer != null) { MenuContainer.Dispose(); MenuContainer = null; } if (MenuFriend != null) { MenuFriend.Dispose(); MenuFriend = null; } if (MenuIcon != null) { MenuIcon.Dispose(); MenuIcon = null; } if (MenuLayer != null) { MenuLayer.Dispose(); MenuLayer = null; } if (MenuLocationUpdates != null) { MenuLocationUpdates.Dispose(); MenuLocationUpdates = null; } if (MenuReport != null) { MenuReport.Dispose(); MenuReport = null; } if (MenuUnmatch != null) { MenuUnmatch.Dispose(); MenuUnmatch = null; } if (NoMessages != null) { NoMessages.Dispose(); NoMessages = null; } if (RoundBottom != null) { RoundBottom.Dispose(); RoundBottom = null; } if (Snackbar != null) { Snackbar.Dispose(); Snackbar = null; } if (SnackBottomConstraint != null) { SnackBottomConstraint.Dispose(); SnackBottomConstraint = null; } if (SnackTopConstraint != null) { SnackTopConstraint.Dispose(); SnackTopConstraint = null; } if (TargetName != null) { TargetName.Dispose(); TargetName = null; } if (UnmatchDate != null) { UnmatchDate.Dispose(); UnmatchDate = null; } }
public override void ViewDidLoad() { try { base.ViewDidLoad(); if (!foregroundNotificationSet) { UIApplication.Notifications.ObserveDidBecomeActive((sender, args) => { c.Log("Entered foreground, registering for notifications"); c.RequestNotification(); BaseActivity currentController = CommonMethods.GetCurrentViewController(); if (currentController is ChatOneActivity) { ((ChatOneActivity)currentController).SetMenu(); //needed in case location updates were running before backgrounding ((ChatOneActivity)currentController).RefreshPage(); } }); foregroundNotificationSet = true; } NoMessages.Text = LangEnglish.NoMessages; NoMessages.Hidden = true; c.DrawBorder(ChatEditMessage); c.AddViews(Snackbar, Snackbar.SnackText, Snackbar.SnackButton); MenuUnmatch.SetTitle(LangEnglish.MenuUnmatch, UIControlState.Normal); MenuBlock.SetTitle(LangEnglish.MenuBlock, UIControlState.Normal); MenuReport.SetTitle(LangEnglish.MenuReport, UIControlState.Normal); c.HideMenu(MenuLayer, MenuContainer, false); ChatMessageWindow.RowHeight = UITableView.AutomaticDimension; ChatMessageWindow.EstimatedRowHeight = 100; ChatOneBack.TouchUpInside += ChatOneBack_Click; ChatSendMessage.TouchUpInside += ChatSendMessage_Click; MenuIcon.TouchUpInside += MenuIcon_Click; MenuLayer.TouchDown += MenuLayer_TouchDown; MenuLocationUpdates.TouchUpInside += MenuLocationUpdates_Click; MenuFriend.TouchUpInside += MenuFriend_Click; MenuUnmatch.TouchUpInside += MenuUnmatch_Click; MenuReport.TouchUpInside += MenuReport_Click; MenuBlock.TouchUpInside += MenuBlock_Click; RoundBottom_Base = RoundBottom; Snackbar_Base = Snackbar; BottomConstraint_Base = BottomConstraint; SnackTopConstraint_Base = SnackTopConstraint; SnackBottomConstraint_Base = SnackBottomConstraint; ChatOneLeftConstraint_Base = ChatOneLeftConstraint; ChatOneRightConstraint_Base = ChatOneRightConstraint; ChatMessageWindow_Base = ChatMessageWindow; } catch (Exception ex) { c.ReportErrorSilent(ex.Message + Environment.NewLine + ex.StackTrace); } }
void ReleaseDesignerOutlets() { if (BackButton != null) { BackButton.Dispose(); BackButton = null; } if (BottomConstraint != null) { BottomConstraint.Dispose(); BottomConstraint = null; } if (DistanceText != null) { DistanceText.Dispose(); DistanceText = null; } if (EditSelf != null) { EditSelf.Dispose(); EditSelf = null; } if (EditSelfBack != null) { EditSelfBack.Dispose(); EditSelfBack = null; } if (EditSelfHeader != null) { EditSelfHeader.Dispose(); EditSelfHeader = null; } if (EditSpacer != null) { EditSpacer.Dispose(); EditSpacer = null; } if (HeaderBackground != null) { HeaderBackground.Dispose(); HeaderBackground = null; } if (HideButton != null) { HideButton.Dispose(); HideButton = null; } if (LastActiveDate != null) { LastActiveDate.Dispose(); LastActiveDate = null; } if (LikeButton != null) { LikeButton.Dispose(); LikeButton = null; } if (LocationTime != null) { LocationTime.Dispose(); LocationTime = null; } if (MapBottomSeparator != null) { MapBottomSeparator.Dispose(); MapBottomSeparator = null; } if (MapSatellite != null) { MapSatellite.Dispose(); MapSatellite = null; } if (MapStreet != null) { MapStreet.Dispose(); MapStreet = null; } if (MapTopSeparator != null) { MapTopSeparator.Dispose(); MapTopSeparator = null; } if (MenuBlock != null) { MenuBlock.Dispose(); MenuBlock = null; } if (MenuContainer != null) { MenuContainer.Dispose(); MenuContainer = null; } if (MenuIcon != null) { MenuIcon.Dispose(); MenuIcon = null; } if (MenuLayer != null) { MenuLayer.Dispose(); MenuLayer = null; } if (MenuReport != null) { MenuReport.Dispose(); MenuReport = null; } if (Name != null) { Name.Dispose(); Name = null; } if (NavigationSpacer != null) { NavigationSpacer.Dispose(); NavigationSpacer = null; } if (NextButton != null) { NextButton.Dispose(); NextButton = null; } if (PercentProgress != null) { PercentProgress.Dispose(); PercentProgress = null; } if (PreviousButton != null) { PreviousButton.Dispose(); PreviousButton = null; } if (ProfileImageContainer != null) { ProfileImageContainer.Dispose(); ProfileImageContainer = null; } if (ProfileImageScroll != null) { ProfileImageScroll.Dispose(); ProfileImageScroll = null; } if (ProfileViewDescription != null) { ProfileViewDescription.Dispose(); ProfileViewDescription = null; } if (ProfileViewMap != null) { ProfileViewMap.Dispose(); ProfileViewMap = null; } if (ProfileViewScroll != null) { ProfileViewScroll.Dispose(); ProfileViewScroll = null; } if (RegisterDate != null) { RegisterDate.Dispose(); RegisterDate = null; } if (ResponseRate != null) { ResponseRate.Dispose(); ResponseRate = null; } if (RippleImageNext != null) { RippleImageNext.Dispose(); RippleImageNext = null; } if (RippleImagePrev != null) { RippleImagePrev.Dispose(); RippleImagePrev = null; } if (RippleProfileView != null) { RippleProfileView.Dispose(); RippleProfileView = null; } if (RoundBottom != null) { RoundBottom.Dispose(); RoundBottom = null; } if (ScrollBottomConstraint != null) { ScrollBottomConstraint.Dispose(); ScrollBottomConstraint = null; } if (SendLocation != null) { SendLocation.Dispose(); SendLocation = null; } if (Snackbar != null) { Snackbar.Dispose(); Snackbar = null; } if (SnackBottomConstraint != null) { SnackBottomConstraint.Dispose(); SnackBottomConstraint = null; } if (SnackTopConstraint != null) { SnackTopConstraint.Dispose(); SnackTopConstraint = null; } if (Username != null) { Username.Dispose(); Username = null; } if (ViewportConstraint != null) { ViewportConstraint.Dispose(); ViewportConstraint = null; } }