Наследование: MonoBehaviour
Пример #1
0
        public List <Node> FindNodesWithinRadius(UV location, double radius)
        {
            var nodes  = new List <Node>();
            var circle = Circle.ByCenterPointRadius(
                Autodesk.DesignScript.Geometry.Point.ByCoordinates(location.U, location.V),
                radius);

            if (!Intersects(circle))
            {
                return(nodes);
            }

            if (IsLeafNode)
            {
                nodes.Add(this);
                return(nodes);
            }

            nodes.AddRange(NW.FindNodesWithinRadius(location, radius));
            nodes.AddRange(NE.FindNodesWithinRadius(location, radius));
            nodes.AddRange(SW.FindNodesWithinRadius(location, radius));
            nodes.AddRange(SE.FindNodesWithinRadius(location, radius));

            return(nodes);
        }
Пример #2
0
    private static void LoadSE(SE se)
    {
        AudioClip se_date = null;
        string    path    = "";

        switch (se)
        {
        case SE.BULLET:
            path = "SE/Bullet";
            break;

        case SE.ENGINE:
            path = "SE/Engine";
            break;

        case SE.EXPLOSION:
            path = "SE/Explosion";
            break;

        case SE.LOCK_ON:
            path = "SE/LockOn";
            break;

        default:
            Assert.IsNotNull(null, "[SoundRegistry]読み込みたいSEが存在しません");
            break;
        }

        se_date = Resources.Load <AudioClip>(path);
        _se.Add(se, se_date);
        //Resources.UnloadUnusedAssets( );
    }
Пример #3
0
        public Node FindNodeWhichContains(UV point)
        {
            Node n = null;

            if (IsLeafNode)
            {
                if (Contains(point))
                {
                    return(this);
                }
            }
            else
            {
                if (NW.Contains(point))
                {
                    n = NW.FindNodeWhichContains(point);
                }
                else if (NE.Contains(point))
                {
                    n = NE.FindNodeWhichContains(point);
                }
                else if (SW.Contains(point))
                {
                    n = SW.FindNodeWhichContains(point);
                }
                else if (SE.Contains(point))
                {
                    n = SE.FindNodeWhichContains(point);
                }
            }

            return(n);
        }
Пример #4
0
 //-----------------------------------------------------
 //  挟まれた時
 //-----------------------------------------------------
 public void Sand(int point, SE se)
 {
     //音
     SoundManager.instance.StartSound_SE(se);
     //削除
     StartCoroutine(WaitDestroy(point));
 }
Пример #5
0
    public void playSoundeffect(SE s)
    {
        switch (s)
        {
        case SE.FLARE:
            sesource.PlayOneShot(flare);
            break;

        case SE.SCREAM:
            sesource.PlayOneShot(scream);
            break;

        case SE.PU:
            sesource.PlayOneShot(pickup);
            break;

        case SE.PD:
            sesource.PlayOneShot(putin);
            break;

        default:
            Debug.LogWarning("unknown sound effect" + s);
            break;
        }
    }
Пример #6
0
 public void setumei2()
 {
     SE.play(2);
     moya2.SetActive(true);
     b = 1;
     serif.GetComponentInChildren <TextMeshProUGUI>().text = "アライグマが倉庫に入りました\n食べ物が取られました";
 }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            Response.CacheControl = "private";
            Response.Expires      = 0;
            Response.AddHeader("pragma", "no-cache");

            Customer ThisCustomer = ((AspDotNetStorefrontPrincipal)Context.User).ThisCustomer;

            int PackID            = CommonLogic.QueryStringUSInt("PackID");
            int ProductID         = CommonLogic.QueryStringUSInt("ProductID");
            int CategoryID        = CommonLogic.QueryStringUSInt("CategoryID");
            int SectionID         = CommonLogic.QueryStringUSInt("SectionID");
            int Quan              = CommonLogic.QueryStringUSInt("Quan");
            int CustomCartRecID   = CommonLogic.QueryStringUSInt("ccartID");
            int ShoppingCartRecID = CommonLogic.QueryStringUSInt("scartID");

            if (Quan != 0 && CustomCartRecID != 0)
            {
                if (Quan > 0)
                {
                    DB.ExecuteSQL("update CustomCart set quantity=quantity+1 where ShoppingCartRecID=" + ShoppingCartRecID.ToString() + " and CustomCartRecID=" + CustomCartRecID.ToString() + " and PackID=" + PackID.ToString() + " and CustomerID=" + ThisCustomer.CustomerID.ToString());
                }
                else
                {
                    DB.ExecuteSQL("update CustomCart set quantity=quantity-1 where ShoppingCartRecID=" + ShoppingCartRecID.ToString() + " and CustomCartRecID=" + CustomCartRecID.ToString() + " and PackID=" + PackID.ToString() + " and CustomerID=" + ThisCustomer.CustomerID.ToString());
                }
                DB.ExecuteSQL("delete from CustomCart where quantity<=0 and ShoppingCartRecID=" + ShoppingCartRecID.ToString() + " and CustomerID=" + ThisCustomer.CustomerID.ToString() + " and PackID=" + PackID.ToString());
            }

            String url = SE.MakeProductAndEntityLink(CommonLogic.QueryStringCanBeDangerousContent("entityname"), PackID, CommonLogic.QueryStringUSInt("entityid"), "");

            Response.Redirect(url + CommonLogic.IIF(CustomCartRecID == 0, "", "?cartrecid=" + ShoppingCartRecID.ToString()));
        }
Пример #8
0
 public void setumei13()
 {
     SE.play(2);
     moya2.SetActive(true);
     b = 1;
     serif.GetComponentInChildren <TextMeshProUGUI>().text = "未来の自分を見ました";
 }
Пример #9
0
 public void setumei14()
 {
     SE.play(2);
     moya2.SetActive(true);
     b = 1;
     serif.GetComponentInChildren <TextMeshProUGUI>().text = "家族の写真を見ました\n悲しい気持ちになりました";
 }
Пример #10
0
 public void setumei8()
 {
     SE.play(2);
     moya2.SetActive(true);
     b = 1;
     serif.GetComponentInChildren <TextMeshProUGUI>().text = "おおかみに追われました\nあなたはにげまどいました";
 }
Пример #11
0
 public void setumei10()
 {
     SE.play(2);        SE.play(2);
     moya2.SetActive(true);
     b = 1;
     serif.GetComponentInChildren <TextMeshProUGUI>().text = "沼に落ちました\n体が大変よごれました";
 }
Пример #12
0
 public void setumei7()
 {
     SE.play(2);
     moya2.SetActive(true);
     b = 1;
     serif.GetComponentInChildren <TextMeshProUGUI>().text = "しっけがひどい日でした\nあなたはいつもよりつかれました";
 }
Пример #13
0
 public void setumei5()
 {
     SE.play(2);
     moya2.SetActive(true);
     b = 1;
     serif.GetComponentInChildren <TextMeshProUGUI>().text = "親子があなたの所に来ました\n水をせがまれした\nしつこく付きまとわれました";
 }
Пример #14
0
 public void setumei4()
 {
     SE.play(2);
     moya2.SetActive(true);
     b = 1;
     serif.GetComponentInChildren <TextMeshProUGUI>().text = "あなたはうっかり水をこぼしました";
 }
Пример #15
0
    // Most paid Employee
    protected string mostPaidEmployee()
    {
        string resEmployee = null;
        double resSalary   = 0;

        foreach (SalariedEmployee SE in listSE)
        {
            if (resSalary < SE.getSalary())
            {
                resSalary   = SE.getSalary();
                resEmployee = string.Format("{0}, {1}, {2:C}",
                                            SE.employeeID, SE.firstName + " " + SE.lastName, SE.getSalary().ToString());
            }
        }
        foreach (HourlyEmployee HE in listHE)
        {
            if (resSalary < HE.getSalary())
            {
                resSalary   = HE.getSalary();
                resEmployee = string.Format("{0}, {1}, {2:C}",
                                            HE.employeeID, HE.firstName + " " + HE.lastName, HE.getSalary().ToString());
            }
        }
        foreach (CommissionEmployee CE in listCE)
        {
            if (resSalary < CE.getSalary())
            {
                resSalary   = CE.getSalary();
                resEmployee = string.Format("{0}, {1}, {2:C}",
                                            CE.employeeID, CE.firstName + " " + CE.lastName, CE.getSalary().ToString());
            }
        }
        return(resEmployee);
    }
Пример #16
0
 public void setumei15()
 {
     SE.play(2);
     moya2.SetActive(true);
     b = 1;
     serif.GetComponentInChildren <TextMeshProUGUI>().text = "ふぶき\nざんねん自然には勝てません";
 }
Пример #17
0
    // Print raw data from object lists
    protected string printReport()
    {
        string printRes = null;

        foreach (SalariedEmployee SE in listSE)
        {
            //printRes += SE.ToString() + "<br/>";
            listEmployee.Add(Convert.ToInt32(SE.getSalary()), SE.ToString() + "<br/>");
        }
        foreach (HourlyEmployee HE in listHE)
        {
            //printRes += HE.ToString() + "<br/>";
            listEmployee.Add(Convert.ToInt32(HE.getSalary()), HE.ToString() + "<br/>");
        }
        foreach (CommissionEmployee CE in listCE)
        {
            //printRes += CE.ToString() + "<br/>";
            listEmployee.Add(Convert.ToInt32(CE.getSalary()), CE.ToString() + "<br/>");
        }

        // Sorting employees
        foreach (var employ in listEmployee.OrderByDescending(key => key.Key))
        {
            printRes += employ.Value;
        }
        // Sorting consultants
        listCons = listCons.OrderByDescending(o => o.payment).ToList();
        foreach (Consultant Cons in listCons)
        {
            printRes += Cons.ToString() + "<br/>";
        }

        return(printRes);
    }
Пример #18
0
 public void setumei16()
 {
     SE.play(2);
     moya2.SetActive(true);
     b = 1;
     serif.GetComponentInChildren <TextMeshProUGUI>().text = "イナゴの大群\n野宿のあなたになす術はありません";
 }
Пример #19
0
    public void PlayBack_SE(SE sound)
    {
        seSource[countSE].clip = seSound[(int)sound];
        seSource[countSE].Play();

        countSE = (int)Mathf.Repeat(countSE + 1, seSource.Length);
    }
Пример #20
0
 void StartFadeOut()
 {
     fadeImage.enabled = true;
     alfa  += fadeSpeed1;
     alfa1 += fadeSpeed1;
     SetAlpha();
     if (alfa >= 1)
     {
         BGM.Stop();
         SE.play(0);
         ibrek[karad].SetActive(false);
         if (uramodo == 0)
         {
             karad = UnityEngine.Random.Range(0, 16);
         }
         else if (uramodo == 1)
         {
             karad = 7;
         }
         gamemane.GetComponent <sentak>().keltutei();
         gamemane.GetComponent <start>().end();
         ibrek[karad].SetActive(true);
         a = 0;
         gamemane.GetComponent <parameter>().iro();
     }
 }
Пример #21
0
        public List <T> QueryBounds(Bounds bounds, bool EdgeTouchIsIntersection)
        {
            List <T> results = new List <T>();

            if (!Bounds.IntersectsWith(bounds, EdgeTouchIsIntersection))
            {
                return(results); // return empty list
            }
            // else check our members
            foreach (BoundsLink <T> member in Members)
            {
                if (member.bounds.IntersectsWith(bounds, EdgeTouchIsIntersection))
                {
                    results.Add(member.link);
                }
            }
            // check our leaves as well
            if (IsDivided)
            {
                results.AddRange(NW.QueryBounds(bounds, EdgeTouchIsIntersection));
                results.AddRange(NE.QueryBounds(bounds, EdgeTouchIsIntersection));
                results.AddRange(SW.QueryBounds(bounds, EdgeTouchIsIntersection));
                results.AddRange(SE.QueryBounds(bounds, EdgeTouchIsIntersection));
            }
            // return the compounded list
            return(results);
        }
Пример #22
0
        private void InitializePageContent()
        {
            pnlRequireReg.Visible         = (RequiresReg && !ThisCustomer.IsRegistered);
            this.pnlEmailToFriend.Visible = !(RequiresReg && !ThisCustomer.IsRegistered);

            emailproduct_aspx_1.Text = "<br/><br/><br/><br/><b>" + AppLogic.GetString("emailproduct.aspx.1", baseSkinID, ThisCustomer.LocaleSetting) + "</b><br/><br/><br/><a href=\"signin.aspx?returnurl=showproduct.aspx?" + Server.HtmlEncode(Server.UrlEncode(CommonLogic.ServerVariables("QUERY_STRING"))) + "\">" + AppLogic.GetString("emailproduct.aspx.2", baseSkinID, ThisCustomer.LocaleSetting) + "</a> " + AppLogic.GetString("emailproduct.aspx.3", baseSkinID, ThisCustomer.LocaleSetting);

            String ProdPic             = String.Empty;
            bool   m_WatermarksEnabled = AppLogic.AppConfigBool("Watermark.Enabled");

            if (m_WatermarksEnabled)
            {
                ProdPic = String.Format("watermark.axd?productid={0}&size=medium", ProductID.ToString());
            }
            else
            {
                ProdPic = AppLogic.LookupImage("Product", ProductID, "medium", baseSkinID, ThisCustomer.LocaleSetting);
            }
            imgProduct.ImageUrl        = ProdPic;
            ProductNavLink.NavigateUrl = SE.MakeProductAndEntityLink(this.SourceEntity, ProductID, SourceEntityID, SEName);
            ProductNavLink.Text        = AppLogic.GetString("emailproduct.aspx.24", baseSkinID, ThisCustomer.LocaleSetting);
            emailproduct_aspx_4.Text   = AppLogic.GetString("emailproduct.aspx.4", baseSkinID, ThisCustomer.LocaleSetting) + " " + ProductName + CommonLogic.IIF(VariantName.Length > 0, " - " + VariantName, "");
            emailproduct_aspx_11.Text  = AppLogic.GetString("emailproduct.aspx.11", baseSkinID, ThisCustomer.LocaleSetting);
            emailproduct_aspx_22.Text  = AppLogic.GetString("emailproduct.aspx.22", baseSkinID, ThisCustomer.LocaleSetting);
            emailproduct_aspx_15.Text  = AppLogic.GetString("emailproduct.aspx.15", baseSkinID, ThisCustomer.LocaleSetting);
            emailproduct_aspx_18.Text  = AppLogic.GetString("emailproduct.aspx.18", baseSkinID, ThisCustomer.LocaleSetting);
            emailproduct_aspx_19.Text  = AppLogic.GetString("emailproduct.aspx.19", baseSkinID, ThisCustomer.LocaleSetting);
            btnSubmit.Text             = AppLogic.GetString("emailproduct.aspx.20", baseSkinID, ThisCustomer.LocaleSetting);
        }
Пример #23
0
 public void setumei1()
 {
     SE.play(2);
     moya2.SetActive(true);
     b = 1;
     serif.GetComponentInChildren <TextMeshProUGUI>().text = "食べ物がくさりました\nもう食べることはできません";
 }
Пример #24
0
        protected void btnSubmit7_Click(object sender, EventArgs e)
        {
            string        sql      = "update product set sename = {0} where productid = {1};";
            StringBuilder SQLBatch = new StringBuilder("set nocount on;");
            int           counter  = 0;

            using (SqlConnection con = new SqlConnection(DB.GetDBConn()))
            {
                con.Open();
                using (IDataReader dr = DB.GetRS("select productid, name from dbo.product", con))
                {
                    while (dr.Read())
                    {
                        SQLBatch.Append(string.Format(sql, DB.SQuote(SE.MungeName(DB.RSFieldByLocale(dr, "name", Localization.GetDefaultLocale()))), DB.RSFieldInt(dr, "productid").ToString()));
                        counter++;
                        if (counter == 500)
                        {
                            DB.ExecuteSQL(SQLBatch.ToString());
                            counter         = 0;
                            SQLBatch.Length = 0;
                            SQLBatch.Append("set nocount on;");
                        }
                    }
                }
            }

            if (SQLBatch.Length > 0)
            {
                DB.ExecuteSQL(SQLBatch.ToString());
            }
            resetError("SEName Updated", false);
        }
        // SEの再生
        public void PlaySE(SE type, bool overlap = false)
        {
            if (useSE)
            {
                if (!overlap)
                {
                    if (audioSource_SE.isPlaying)
                    {
                        audioSource_SE.Stop();
                    }
                }

                audioSource_SE.volume = volSE;

                switch (type)
                {
                case SE.CLICK:
                    if (SE_Click != null)
                    {
                        audioSource_SE.PlayOneShot(SE_Click);
                    }
                    break;

                case SE.CANCEL:
                    if (SE_Cancel != null)
                    {
                        audioSource_SE.PlayOneShot(SE_Cancel);
                    }
                    break;

                default: break;
                }
            }
        }
Пример #26
0
 void OnCollisionEnter2D(Collision2D other)
 {
     if (other.gameObject.tag == "Miscellaneous food" || other.gameObject.tag == "Meat food" || other.gameObject.tag == "Herbivores")
     {
         foreach (ContactPoint2D point in other.contacts)
         {
             Instantiate(Geteffect, point.point, Quaternion.identity);
         }
         gamemanager.GetComponent <Player_Move>().countnext();
         transform.parent = Player.transform;
         SE.play(0);
     }
     if (other.gameObject.tag == "no touch")
     {
         foreach (ContactPoint2D point in other.contacts)
         {
             Instantiate(killeffect, point.point, Quaternion.identity);
         }
         Player_Move.controoff();
         gamemanager.GetComponent <Player_Move>().gameover();
         SE.play(2);
     }
     if (other.gameObject.tag == "goal")
     {
         foreach (ContactPoint2D point in other.contacts)
         {
             Instantiate(goalstar, point.point, Quaternion.identity);
         }
         gamemanager.GetComponent <Player_Move>().effectstart();
         SE.play(3);
     }
 }
        protected override void OnInit(EventArgs e)
        {
            LoadThisKitData();

            if (this.KitData == null)
            {
                Response.Redirect(SE.MakeDriverLink("ProductNotFound"));
            }

            if (KitData.HasFileUploadGroup)
            {
                string key = string.Empty;
                if (this.IsPostBack)
                {
                    key = GetTempFileStub();
                }
                else
                {
                    key = Guid.NewGuid().ToString().Substring(0, 7);
                    GenerateTempFileStub(key);
                }

                this.KitData.TempFileStub = key;
            }

            DetermineIfOrderable();
            BindData();

            if (this.KitData.HasCartMapping)
            {
                SetupCartLineItemDefaults();
            }

            if (!this.IsPostBack)
            {
                ProductID      = CommonLogic.QueryStringUSInt("ProductID");
                CategoryID     = CommonLogic.QueryStringUSInt("CategoryID");
                SectionID      = CommonLogic.QueryStringUSInt("SectionID");
                ManufacturerID = CommonLogic.QueryStringUSInt("ManufacturerID");
                DistributorID  = CommonLogic.QueryStringUSInt("DistributorID");
                GenreID        = CommonLogic.QueryStringUSInt("GenreID");
                VectorID       = CommonLogic.QueryStringUSInt("VectorID");

                SetupProductDefaults();
                RenderXmlPackageHeader();
            }

            if (this.KitData.RestrictedQuantities != null)
            {
                txtQuantity.Visible = false;
                foreach (int i in this.KitData.RestrictedQuantities)
                {
                    ddQuantity.Items.Add(new ListItem(i.ToString(), i.ToString()));
                }
                ddQuantity.Visible = true;
            }

            base.OnInit(e);
        }
Пример #28
0
	//基本はこいつで鳴らします
	public void CenterPlay(SE patern = SE.NoSound)
	{
		//音を取得,再生
		if (patern != SE.NoSound) {
			_Center.clip = _se_patern [patern];
			_Center.Play ();
		}
	}
Пример #29
0
 public static void Play(SE.Name name, float volume, float pitch = 1f)
 {
     if (se == null)
     {
         se = GameObject.Find("SE").GetComponent <SE>();
     }
     se.Play(name, volume, pitch);
 }
Пример #30
0
        ///<Summary>
        ///<CreatedOn>20/12/2017</CreatedOn>
        ///<Author>Sunny Bhardwaj</Author>
        ///<Description>Returns object for SE segment</Description>
        ///</Summary>
        public static SE GetSE(string segmentCount, string transSetControlNo) //Transaction Trailer
        {
            SE obj = new SE();

            obj.SE01 = CreateString(segmentCount, (int)SegmentLength.One, (int)SegmentLength.Ten, '0', true);        //segmentCount;
            obj.SE02 = CreateString(transSetControlNo, (int)SegmentLength.Four, (int)SegmentLength.Nine, '0', true); //transSetControlNo.PadLeft(9, '0');
            return(obj);
        }
Пример #31
0
 public void Enable()
 {
     if (!enable)
     {
         SE.Play(gameObject);
     }
     enable = true;
 }
Пример #32
0
 protected void Button1_Click1(object sender, EventArgs e)
 {
     SE se = new SE();
     se.EvalSearchString(TextBox1.Text, TermGroup.institute);
     se.EvalSearchString(TextBox2.Text, TermGroup.napr);
     se.EvalSearchString(TextBox3.Text, TermGroup.kvalif);
     se.EvalSearchString(TextBox4.Text, TermGroup.fobuch);
     se.EvalSearchString(TextBox5.Text, TermGroup.disciplin);
     se.EvalSearchString(TextBox6.Text, TermGroup.sostavitel);
     se.EvalSearchString(TextBox7.Text, TermGroup.zaveril);
     se.EvalSearchString(TextBox8.Text, TermGroup.body);
     docs = se.GetResult();
     GridView1.DataSource = docs.Select(doc =>
     {
         HtmlButton link = new HtmlButton();
         link.ID = doc.id.ToString();
         return new { doc.name, doc.weight, link, doc.path };
     });
     GridView1.DataBind();
 }
Пример #33
0
	public void RightPlay(SE patern)
	{
		//音を取得,再生
		_Right.clip = _se_patern [patern];
		_Right.Play ();
	}
Пример #34
0
	public void LeftPlay(SE patern)
	{
		//音を取得,再生
		_Left.clip = _se_patern [patern];
		_Left.Play ();
	}
Пример #35
0
        protected override void LoadContent()
        {
            font = Content.Load<SpriteFont>("Content/SpriteFont1");
            sprite = new SpriteBatch(GraphicsDevice);
            statupscreen = new StartupScreen(sprite, Gm.GraphicsDevice);
            stageselect = new StageSelect(sprite, Gm.GraphicsDevice);
            talkevent = new Event(sprite, Gm.GraphicsDevice, font);
            gameover = new GameOver(sprite, Gm.GraphicsDevice);
            song = new Song[8];
            for (int i = 0; i < 8; i++)
            {
                song[i] = Content.Load<Song>("Content/bgm"+i);
            }

                hitbox = new HitBox();
            enemydata = new GetEnemyDate();
            bgm = new BGM(song);
            //bgm2 = new BGM(song);
               se = new SE();
              bgm.setBGM(1);
              //bgm2.setBGM(4);
            // 秒 (Second) を取得する
             iSecond = dtNow.Second;

             Stream s = File.OpenRead("Content/images/reng1.png");
             reng = Texture2D.FromStream(Gm.GraphicsDevice, s);
        }
Пример #36
0
    /// <summary>
    /// SEの再生
    /// </summary>
    public void PlaySE(SE type, bool overlap = false)
    {
        if(useSE)
        {
            if(!overlap)
            {
                if(audioSource_SE.isPlaying)
                    audioSource_SE.Stop();
            }

            audioSource_SE.volume = volSE;

            switch(type)
            {
                case SE.CLICK:
                    if(SE_Click != null)
                        audioSource_SE.PlayOneShot(SE_Click);
                    break;

                case SE.CANCEL:
                    if(SE_Cancel != null)
                        audioSource_SE.PlayOneShot(SE_Cancel);
                    break;

                default: break;
            }
        }
    }
Пример #37
0
 public void registSound(SE se)
 {
     if (audio_idx_ >= SystemManager.AUDIO_CHANNEL_MAX) {
     Debug.Log("max audio channel is used.");
     return;
     }
     se_[audio_idx_] = se;
     ++audio_idx_;
 }