Пример #1
0
    public override bool Update()
    {
        object objA = A.Value;
        object objB = B.Value;

        if (objA != null && objB != null)
        {
            GameObject goA = (GameObject)objA;
            GameObject goB = (GameObject)objB;

            //EB.Debug.Log("Equality test: A:"+numA+" B:"+numB);

            if (goA == goB)
            {
                Check1.Invoke();
            }

            if (goA != goB)
            {
                Check2.Invoke();
            }
        }
        else
        {
            EB.Debug.Log("Equality test failed, game object A or B is null - Parent:" + Parent.name);
        }
        return(false);
    }
Пример #2
0
 //박스에서 나온다.
 void OnTriggerExit(Collider other)
 {
     if (other.tag == "Player")
     {
         Check1.GetComponent <HollCheck>().CheckOff();
         Check2.GetComponent <HollCheck>().CheckOff();
         BoxIn = false;
         Go1   = true;
         Go2   = true;
         Back1 = true;
         Back2 = true;
     }
 }
Пример #3
0
    public override bool Update()
    {
        object objA = A.Value;
        object objB = B.Value;

        if (objA != null && objB != null)
        {
            float numA = (float)objA;
            float numB = (float)objB;

            //EB.Debug.Log("Equality test: A:"+numA+" B:"+numB);

            if (numA == numB)
            {
                Check1.Invoke();
            }

            if (numA > numB)
            {
                Check2.Invoke();
            }

            if (numA < numB)
            {
                Check3.Invoke();
            }

            if (numA >= numB)
            {
                Check4.Invoke();
            }

            if (numA <= numB)
            {
                Check5.Invoke();
            }

            if (numA != numB)
            {
                Check6.Invoke();
            }
        }
        else
        {
            EB.Debug.Log("Equality test failed, item A or B is null - Parent:" + Parent.name);
        }
        return(false);
    }
Пример #4
0
        private void InitializeComponent(Control owner)
        {
            this.lbl_Caption = new Label2();
            this.pic_Icon = new Picture2();
            this.panel_Footer = new Panel2();
            this.check_DonotShow = new Check2();
            this.simpleButton3 = new Button2();
            this.simpleButton2 = new Button2();
            this.simpleButton1 = new Button2();
            this.panel_Content = new Panel2();
            this.txt_Content = new Rich2();
            this.panel_Caption = new Panel2();
#if DEVEXPRESS
            ((System.ComponentModel.ISupportInitialize)(this.panel_Caption)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pic_Icon.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.panel_Footer)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.check_DonotShow.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.panel_Content)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_Content.Properties)).BeginInit();
#endif
            this.panel_Caption.SuspendLayout();
            this.panel_Footer.SuspendLayout();
            this.panel_Content.SuspendLayout();
            this.check_DonotShow.SuspendLayout();
            this.SuspendLayout();
#if DEVEXPRESS
            var noBorder = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
#else
            var noBorder = BorderStyle.None;
#endif
            //
            // panel_Caption
            //
            this.panel_Caption.BorderStyle = noBorder;
            this.panel_Caption.Controls.Add(this.lbl_Caption);
            this.panel_Caption.Controls.Add(this.pic_Icon);
            this.panel_Caption.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel_Caption.Location = new System.Drawing.Point(8, 8);
            this.panel_Caption.Name = "panel_Caption";
            this.panel_Caption.Size = new System.Drawing.Size(478, 64);
            this.panel_Caption.TabIndex = 0;
            //
            // lbl_Caption
            //
#if DEVEXPRESS
            this.lbl_Caption.AllowHtmlString = true;
            this.lbl_Caption.Appearance.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold);
            this.lbl_Caption.Appearance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(51)))), ((int)(((byte)(153)))));
            this.lbl_Caption.Appearance.Options.UseFont = true;
            this.lbl_Caption.Appearance.Options.UseForeColor = true;
            this.lbl_Caption.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
#else
            this.lbl_Caption.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold);
            this.lbl_Caption.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(51)))), ((int)(((byte)(153)))));
            this.lbl_Caption.TextAlign = ContentAlignment.MiddleLeft;
            this.lbl_Caption.AutoSize = false;
#endif
            this.lbl_Caption.Dock = System.Windows.Forms.DockStyle.Right;
            this.lbl_Caption.Location = new System.Drawing.Point(64, 0);
            this.lbl_Caption.Name = "lbl_Caption";
            this.lbl_Caption.Size = new System.Drawing.Size(414, 64);
            this.lbl_Caption.TabIndex = 1;
            this.lbl_Caption.Text = "标题";
            //
            // pic_Icon
            //
            this.pic_Icon.Location = new System.Drawing.Point(14, 14);
            this.pic_Icon.Name = "pic_Icon";
#if DEVEXPRESS
            this.pic_Icon.Properties.Appearance.BackColor = System.Drawing.Color.Transparent;
            this.pic_Icon.Properties.Appearance.Options.UseBackColor = true;
            this.pic_Icon.Properties.BorderStyle = noBorder;
            this.pic_Icon.Properties.ShowMenu = false;
#else
            this.pic_Icon.BackColor = System.Drawing.Color.Transparent;
            this.pic_Icon.BorderStyle = noBorder;
#endif
            this.pic_Icon.Size = new System.Drawing.Size(36, 36);
            this.pic_Icon.TabIndex = 0;
            //
            // panel_Footer
            //
            this.panel_Footer.BorderStyle = noBorder;
            this.panel_Footer.Controls.Add(this.check_DonotShow);
            this.panel_Footer.Controls.Add(this.simpleButton3);
            this.panel_Footer.Controls.Add(this.simpleButton2);
            this.panel_Footer.Controls.Add(this.simpleButton1);
            this.panel_Footer.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panel_Footer.Location = new System.Drawing.Point(8, 143);
            this.panel_Footer.Name = "panel_Footer";
            this.panel_Footer.Size = new System.Drawing.Size(478, 35);
            this.panel_Footer.TabIndex = 1;
            //
            // check_DonotShow
            //
            this.check_DonotShow.Location = new System.Drawing.Point(3, 7);
            this.check_DonotShow.Name = "check_DonotShow";
#if DEVEXPRESS
            this.check_DonotShow.Properties.Caption = "不再显示";
#else
            this.check_DonotShow.Text = "不再显示";
#endif
            this.check_DonotShow.AutoSize = true;
            this.check_DonotShow.Size = new System.Drawing.Size(75, 19);
            this.check_DonotShow.TabIndex = 3;
            //
            // simpleButton3
            //
            this.simpleButton3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.simpleButton3.Location = new System.Drawing.Point(234, 6);
            this.simpleButton3.Name = "simpleButton3";
            this.simpleButton3.Size = new System.Drawing.Size(75, 25);
            this.simpleButton3.TabIndex = 2;
            this.simpleButton3.Text = "Three";
            //
            // simpleButton2
            //
            this.simpleButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.simpleButton2.Location = new System.Drawing.Point(315, 6);
            this.simpleButton2.Name = "simpleButton2";
            this.simpleButton2.Size = new System.Drawing.Size(75, 25);
            this.simpleButton2.TabIndex = 1;
            this.simpleButton2.Text = "Tow";
            //
            // simpleButton1
            //
            this.simpleButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.simpleButton1.Location = new System.Drawing.Point(396, 6);
            this.simpleButton1.Name = "simpleButton1";
            this.simpleButton1.Size = new System.Drawing.Size(75, 25);
            this.simpleButton1.TabIndex = 0;
            this.simpleButton1.Text = "One";
            //
            // panel_Content
            //
#if DEVEXPRESS
            this.panel_Content.Appearance.BackColor = System.Drawing.Color.White;
            this.panel_Content.Appearance.Options.UseBackColor = true;
#else
            this.panel_Content.BackColor = System.Drawing.Color.White;
#endif
            this.panel_Content.BorderStyle = noBorder;
            this.panel_Content.Controls.Add(this.txt_Content);
            this.panel_Content.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panel_Content.Location = new System.Drawing.Point(8, 72);
            this.panel_Content.Name = "panel_Content";
            this.panel_Content.Padding = new System.Windows.Forms.Padding(32, 24, 32, 24);
            this.panel_Content.Size = new System.Drawing.Size(478, 71);
            this.panel_Content.TabIndex = 2;
            //
            // txt_Content
            //
            this.txt_Content.Dock = System.Windows.Forms.DockStyle.Fill;
            this.txt_Content.Location = new System.Drawing.Point(32, 24);
            this.txt_Content.Name = "txt_Content";
#if DEVEXPRESS
            this.txt_Content.EditValue = "";
            this.txt_Content.Properties.Appearance.BackColor = System.Drawing.SystemColors.Window;
            this.txt_Content.Properties.Appearance.Font = new System.Drawing.Font("新宋体", 9F);
            this.txt_Content.Properties.Appearance.Options.UseBackColor = true;
            this.txt_Content.Properties.Appearance.Options.UseFont = true;
            this.txt_Content.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            this.txt_Content.Properties.ReadOnly = true;
#else
            this.txt_Content.Dock = System.Windows.Forms.DockStyle.Fill;
            this.txt_Content.Text = "";
            this.txt_Content.Location = new System.Drawing.Point(32, 24);
            this.txt_Content.Name = "txt_Content";
            this.txt_Content.BackColor = System.Drawing.SystemColors.Window;
            this.txt_Content.Font = new System.Drawing.Font("新宋体", 9F);
            this.txt_Content.BorderStyle = BorderStyle.None;
            this.txt_Content.ReadOnly = true;
#endif
            this.txt_Content.Size = new System.Drawing.Size(414, 23);
            this.txt_Content.TabIndex = 2;
            this.txt_Content.Enter += new System.EventHandler(this.txt_Content_Enter);
            this.txt_Content.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_Content_KeyDown);
            this.txt_Content.Leave += new System.EventHandler(this.txt_Content_Leave);
            //
            // MessageBoxForm
            //
            this.AcceptButton = this.simpleButton1;
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(494, 186);
            this.Controls.Add(this.panel_Content);
            this.Controls.Add(this.panel_Footer);
            this.Controls.Add(this.panel_Caption);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "MessageBoxForm";
            this.Padding = new System.Windows.Forms.Padding(8);
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = (owner == null) ? System.Windows.Forms.FormStartPosition.CenterScreen : FormStartPosition.CenterParent;
#if DEVEXPRESS
            this.LookAndFeel.SkinName = "Money Twins";
            ((System.ComponentModel.ISupportInitialize)(this.panel_Caption)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pic_Icon.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.panel_Footer)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.check_DonotShow.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.panel_Content)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_Content.Properties)).EndInit();
#endif
            this.panel_Caption.ResumeLayout(false);
            this.panel_Footer.ResumeLayout(false);
            this.check_DonotShow.ResumeLayout(false);
            this.panel_Content.ResumeLayout(false);
            this.ResumeLayout(false);
        }
Пример #5
0
    private void Update()
    {
        check1 = Check1.GetComponent <HollCheck>().GetCheck();
        check2 = Check2.GetComponent <HollCheck>().GetCheck();
        //박스에 들어왔음
        if (BoxIn)
        {
            //2에서 3로 갈때
            if (check1)
            {
                //플레이어 거리
                distance = Vector3.Distance(Check1.transform.position, player.transform.position);
                if (distance > Go_map3On)
                {
                    if (Go2)
                    {
                        Go2 = false;
                        SceneMap.GetComponent <SceneOnOffManager>().Map3On();
                        Remix.isMap3 = true;
                    }
                }
                else
                {
                    Go2 = true;
                    SceneMap.GetComponent <SceneOnOffManager>().Map3Off();
                    Remix.isMap3 = false;
                }

                if (distance > Go_map2Off)
                {
                    Go1 = true;
                    SceneMap.GetComponent <SceneOnOffManager>().Map2Off();
                }
                else
                {
                    if (Go1)
                    {
                        Go1 = false;
                        SceneMap.GetComponent <SceneOnOffManager>().Map2On();
                    }
                }
            }
            //3에서 2로 갈때
            if (check2)
            {
                distance = Vector3.Distance(Check2.transform.position, player.transform.position);
                if (distance > Back_map2On)
                {
                    if (Back1)
                    {
                        Back1 = false;
                        SceneMap.GetComponent <SceneOnOffManager>().Map2On();
                    }
                }
                else
                {
                    Back1 = true;
                    SceneMap.GetComponent <SceneOnOffManager>().Map2Off();
                }

                if (distance > Back_map3Off)
                {
                    Back2 = true;
                    SceneMap.GetComponent <SceneOnOffManager>().Map3Off();
                }
                else
                {
                    if (Back2)
                    {
                        Back2 = false;
                        SceneMap.GetComponent <SceneOnOffManager>().Map3On();
                    }
                }
            }
        }
    }