void Start() { player = GameObject.FindGameObjectWithTag("Player"); playerHealth = player.GetComponent <PlayerHealth>() as PlayerHealth; pointCount = GameObject.FindWithTag("GameController").GetComponent <PointCount>() as PointCount; idleClips = new List <AudioClip>(); attackClips = new List <AudioClip>(); deathClips = new List <AudioClip>(); idleClips.Add(idle_clip1); idleClips.Add(idle_clip2); attackClips.Add(attack_clip1); deathClips.Add(death_clip1); deathClips.Add(death_clip2); deathClips.Add(death_clip3); Physics.IgnoreLayerCollision(8, 9); animator = GetComponentInChildren <Animator>(); animator.SetBool("isAlive", true); animator.SetBool("isWalking", false); animator.SetBool("isAttacking", false); health = maxHealth; healthSlider.value = calculateHealth(); controller = GetComponent <CharacterController>(); }
public override int GetHashCode() { int hash = 1; if (PointCount != 0) { hash ^= PointCount.GetHashCode(); } if (FeatureCount != 0) { hash ^= FeatureCount.GetHashCode(); } if (Distance != 0) { hash ^= Distance.GetHashCode(); } if (ElapsedTime != 0) { hash ^= ElapsedTime.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
void Start() { speedControllor = Conrtollor.GetComponent <SpeedControllor>(); pointCount = Conrtollor.GetComponent <PointCount>(); speed = speedControllor.getSpeed(); Destroy(gameObject, 10f); }
public void TweetButton() { int point = PointCount.getPoint(); int salary = 10 * point; string message = "刺身に" + point.ToString() + "個たんぽぽを乗せました\n" + "給料は" + salary.ToString() + "円です。\n -刺身にたんぽぽをのせるゲーム- https://goo.gl/fFNKqP #nikonamakudou"; Application.OpenURL("http://twitter.com/intent/tweet?text=" + WWW.EscapeURL(message)); }
void Start() { gameRestart = GetComponent <GameRestart>(); pointCount = GetComponent <PointCount>(); actualTime = initialTime; timeCount.text = actualTime.ToString(); InvokeRepeating("DecreaseTime", 1f, 1f); }
/// <summary> /// Adds the numeric point. /// </summary> /// <param name="numberingCache">The numbering cache.</param> /// <param name="pointCount">The point count.</param> /// <param name="rowIndex">Index of the row.</param> /// <param name="numericValueText">The numeric value text.</param> protected static void AddNumericPoint(NumberingCache numberingCache, PointCount pointCount, int rowIndex, string numericValueText) { NumericPoint numericPount = new NumericPoint(); numericPount.Index = new UInt32Value((uint)rowIndex); numericPount.NumericValue = new NumericValue(numericValueText); numberingCache.AppendChild <NumericPoint>(numericPount); pointCount.Val = new UInt32Value((UInt32)(pointCount.Val.Value + 1)); }
// Start is called before the first frame update void Start() { PointCount Score = FindObjectOfType <PointCount>(); Cursor.visible = true; scoreText.text = "You scored: " + Score.points; Destroy(Score.gameObject); }
public GameObject objectToActivate; // BonusTimeText activator /*Function: Start * Gets the scripts of TreasureSpawner, PointText and CountDownText * because they will be modified based on this script. * Sets found to false.*/ private void Start() { bool_TreasureSpawnScript = treasure.GetComponent <TreasureSpawnerS>(); bool_PointTextScript = counter.GetComponent <PointCount>(); bool_CountdownTextTMPScript = timebonus.GetComponent <CountdownTextTMP>(); treasureFound = false; if (objectToActivate.activeInHierarchy) { objectToActivate.SetActive(false); } }
// Use this for initialization void Start() { int point = PointCount.getPoint(); int salary = 10 * point; string message = ""; if (!PointCount.magroFlg) { message = "刺身に" + point.ToString() + "個たんぽぽを乗せました\n" + "給料は" + salary.ToString() + "円です。"; } else { message = "貴様!! マグロに触っただろ!!\n首じゃぁ!!!!"; } comment.text = message; }
void OnCollisionEnter(Collision collision) { if (collision.gameObject.tag == "conveyor") { if (!LoadGame.hanafubikiFlg) { SceneManager.LoadScene("Gameend"); } } if (collision.gameObject.tag == "maguro") { pointCount = Conrtollor.GetComponent <PointCount>(); pointCount.magroHit(); SceneManager.LoadScene("Gameend"); } }
void AddPoint(Point pointToAdd, List <PointCount> list) { bool newLocation = true; foreach (PointCount count in list) { if (count.pointData.Equals(pointToAdd)) { newLocation = false; count.count++; break; } } if (newLocation) { PointCount oneCount = new PointCount(pointToAdd); list.Add(oneCount); } }
/// <summary> /// Gets the string reference. /// </summary> /// <param name="formulaText">The formula text.</param> /// <param name="pointCountVal">The point count val.</param> /// <returns></returns> protected static StringReference GetStringReference(string formulaText, int pointCountVal) { StringReference stringReference = new StringReference(); Formula formula = new Formula(); formula.Text = formulaText; StringCache stringCache = new StringCache(); PointCount pointCount = new PointCount() { Val = (UInt32Value)(uint)pointCountVal }; stringCache.Append(pointCount); stringReference.Append(formula); stringReference.Append(stringCache); return(stringReference); }
/// <summary> /// Sets the numbering cache. /// </summary> /// <param name="numberReference">The number reference.</param> /// <param name="numberingCache">The numbering cache.</param> /// <param name="pointCount">The point count.</param> protected static void SetNumberingCache(NumberReference numberReference, out NumberingCache numberingCache, out PointCount pointCount) { numberingCache = numberReference.Descendants <NumberingCache>().FirstOrDefault(); if (numberingCache == null) { numberingCache = new NumberingCache(); numberReference.AppendChild <NumberingCache>(numberingCache); } pointCount = numberingCache.Descendants <PointCount>().FirstOrDefault(); if (pointCount == null) { pointCount = new PointCount(); numberingCache.AppendChild <PointCount>(pointCount); } pointCount.Val = new UInt32Value((uint)0); numberingCache.FormatCode = new FormatCode("General"); }
// Use this for initialization void Start() { TutorialBtnReact = GameObject.FindGameObjectWithTag("HUD").GetComponent <TutorialBtnReact>(); PointCount = GameObject.FindGameObjectWithTag("Player").GetComponent <PointCount>(); RescueLeader = GameObject.FindGameObjectWithTag("RescueLeader"); RescueRadius = RescueLeader.transform.Find("Radius").gameObject; BlackBtn.GetComponent <Button>().onClick.AddListener(SetMarked); RedBtn.GetComponent <Button>().onClick.AddListener(SetMarked); GreenBtn.GetComponent <Button>().onClick.AddListener(SetMarked); YellowBtn.GetComponent <Button>().onClick.AddListener(SetMarked); TripleActions = new List <GameObject>() { TripleBot, TripleMid, TripleBtnBg, TripleBtnClose }; TutorialList = new List <GameObject>() { StartingContainer, CommunicateContainer, FinishContainer, PauseContainer, HowContainer, ScoreContainer, BreathingContainer, PulseContainer, CBContainer, RAContainer, BleedingContainer, DoneContainer, CloseActionsContainer, MarkVictimContainer, VictimSearchContainer, NotFinishedContainer }; BtnActions = new List <GameObject>() { HowBtn, MenuBtn }; BtnList = new List <GameObject>() { BlackBtn, RedBtn, YellowBtn, GreenBtn }; CloseAll(); DisableTripleBtn(); StartingContainer.SetActive(true); Time.timeScale = 0; }
protected void modificaChartData(string FormatoValori, string titoloSerie, out SeriesText seriesText1, out CategoryAxisData categoryAxisData1, out Values values1) { seriesText1 = new SeriesText(); StringReference stringReference1 = new StringReference(); Formula formula1 = new Formula(); formula1.Text = "Foglio1!$B$1"; StringCache stringCache1 = new StringCache(); PointCount pointCount1 = new PointCount() { Val = (UInt32Value)1U }; StringPoint stringPoint1 = new StringPoint() { Index = (UInt32Value)0U }; NumericValue numericValue1 = new NumericValue(); numericValue1.Text = titoloSerie; stringPoint1.Append(numericValue1); stringCache1.Append(pointCount1); stringCache1.Append(stringPoint1); stringReference1.Append(formula1); stringReference1.Append(stringCache1); seriesText1.Append(stringReference1); DataPoint dataPoint1 = new DataPoint(); Index index2 = new Index() { Val = (UInt32Value)2U }; dataPoint1.Append(index2); //################################i testi #################################### categoryAxisData1 = new CategoryAxisData(); StringReference stringReference2 = new StringReference(); Formula formula2 = new Formula(); formula2.Text = string.Format("Foglio1!$A$2:$A${0}", valori.Count + 2); StringCache stringCache2 = new StringCache(); UInt32Value nValori = Convert.ToUInt32(valori.Count); PointCount pointCount2 = new PointCount() { Val = nValori }; StringPoint[] stringPoints = new StringPoint[nValori]; UInt32Value n = 0; foreach (KeyValuePair <string, double> item in valori) { stringPoints[n] = new StringPoint() { Index = (UInt32Value)n }; NumericValue numericValue2 = new NumericValue(); numericValue2.Text = item.Key; stringPoints[n].Append(numericValue2); n += 1; } stringCache2.Append(pointCount2); for (int i = 0; i < n; i++) { stringCache2.Append(stringPoints[i]); } stringReference2.Append(formula2); stringReference2.Append(stringCache2); categoryAxisData1.Append(stringReference2); //################################i valori#################################### values1 = new Values(); NumberReference numberReference1 = new NumberReference(); Formula formula3 = new Formula(); formula3.Text = string.Format("Foglio1!$B$2:$B${0}", valori.Count + 2); NumberingCache numberingCache1 = new NumberingCache(); FormatCode formatCode1 = new FormatCode(); formatCode1.Text = FormatoValori; //<----------------------------------------------------------- PointCount pointCount3 = new PointCount() { Val = nValori }; NumericPoint[] numericPoints = new NumericPoint[nValori]; n = 0; foreach (KeyValuePair <string, double> item in valori) { numericPoints[n] = new NumericPoint() { Index = (UInt32Value)n }; NumericValue numericValue = new NumericValue(); numericValue.Text = item.Value.ToString(); numericValue.Text = numericValue.Text.Replace(",", "."); // devo forzare il formato americano numericPoints[n].Append(numericValue); n += 1; } numberingCache1.Append(formatCode1); numberingCache1.Append(pointCount3); for (int i = 0; i < n; i++) { numberingCache1.Append(numericPoints[i]); } numberReference1.Append(formula3); numberReference1.Append(numberingCache1); values1.Append(numberReference1); }
// Use this for initialization public void Start() { pointcount = GameObject.Find("Player").GetComponent <PointCount> (); }
void Start() { pointCount = GetComponent <PointCount>(); }
void Start() { pointCount = GameObject.FindGameObjectWithTag("MiniGameManager").GetComponent <PointCount>(); timeCount = GameObject.FindGameObjectWithTag("MiniGameManager").GetComponent <TimeCount>(); player = GameObject.FindGameObjectWithTag("Player"); }
void Start() { Instance = this; ////指定Instance這個程式 Score = PlayerPrefs.GetInt("currentscore"); }
public PieChartSeries GeneratePieChartSeries(string[] labels, double[] data) { PieChartSeries pieChartSeries1 = new PieChartSeries(); Index index1 = new Index() { Val = (UInt32Value)0U }; Order order1 = new Order() { Val = (UInt32Value)0U }; SeriesText seriesText1 = new SeriesText(); NumericValue numericValue1 = new NumericValue(); numericValue1.Text = "sreie 1"; seriesText1.Append(numericValue1); CategoryAxisData categoryAxisData1 = new CategoryAxisData(); StringLiteral stringLiteral1 = new StringLiteral(); PointCount pointCount1 = new PointCount() { Val = (uint)labels.Length }; //StringPoint stringPoint1 = new StringPoint() { Index = (UInt32Value)0U }; //NumericValue numericValue2 = new NumericValue(); //numericValue2.Text = "a"; //stringPoint1.Append(numericValue2); //StringPoint stringPoint2 = new StringPoint() { Index = (UInt32Value)1U }; //NumericValue numericValue3 = new NumericValue(); //numericValue3.Text = "n"; //stringPoint2.Append(numericValue3); //StringPoint stringPoint3 = new StringPoint() { Index = (UInt32Value)2U }; //NumericValue numericValue4 = new NumericValue(); //numericValue4.Text = "c"; //stringPoint3.Append(numericValue4); //StringPoint stringPoint4 = new StringPoint() { Index = (UInt32Value)3U }; //NumericValue numericValue5 = new NumericValue(); //numericValue5.Text = "d"; //stringPoint4.Append(numericValue5); //Ajout des etiquette de legendes for (int i = 0; i < labels.Length; i++) { StringPoint stringPoint = new StringPoint() { Index = (uint)i }; NumericValue numericValue = new NumericValue(); numericValue.Text = labels[i]; stringPoint.Append(numericValue); stringLiteral1.Append(stringPoint); } stringLiteral1.Append(pointCount1); //stringLiteral1.Append(stringPoint1); //stringLiteral1.Append(stringPoint2); //stringLiteral1.Append(stringPoint3); //stringLiteral1.Append(stringPoint4); categoryAxisData1.Append(stringLiteral1); DocumentFormat.OpenXml.Drawing.Charts.Values values1 = new DocumentFormat.OpenXml.Drawing.Charts.Values(); NumberLiteral numberLiteral1 = new NumberLiteral(); FormatCode formatCode1 = new FormatCode(); formatCode1.Text = "General"; PointCount pointCount2 = new PointCount() { Val = (uint)data.Length }; //NumericPoint numericPoint1 = new NumericPoint() { Index = (UInt32Value)0U }; //NumericValue numericValue6 = new NumericValue(); //numericValue6.Text = "1"; //numericPoint1.Append(numericValue6); //NumericPoint numericPoint2 = new NumericPoint() { Index = (UInt32Value)1U }; //NumericValue numericValue7 = new NumericValue(); //numericValue7.Text = "2"; //numericPoint2.Append(numericValue7); //NumericPoint numericPoint3 = new NumericPoint() { Index = (UInt32Value)2U }; //NumericValue numericValue8 = new NumericValue(); //numericValue8.Text = "3"; //numericPoint3.Append(numericValue8); //NumericPoint numericPoint4 = new NumericPoint() { Index = (UInt32Value)3U }; //NumericValue numericValue9 = new NumericValue(); //numericValue9.Text = "5"; //numericPoint4.Append(numericValue9); for (int i = 0; i < data.Length; i++) { NumericPoint numericPoint = new NumericPoint() { Index = (uint)i }; NumericValue numericValue = new NumericValue(); numericValue.Text = data[i].ToString(); numericPoint.Append(numericValue); numberLiteral1.Append(numericPoint); } numberLiteral1.Append(formatCode1); numberLiteral1.Append(pointCount2); //numberLiteral1.Append(numericPoint1); //numberLiteral1.Append(numericPoint2); //numberLiteral1.Append(numericPoint3); //numberLiteral1.Append(numericPoint4); values1.Append(numberLiteral1); pieChartSeries1.Append(index1); pieChartSeries1.Append(order1); pieChartSeries1.Append(seriesText1); pieChartSeries1.Append(categoryAxisData1); pieChartSeries1.Append(values1); return(pieChartSeries1); }