public bool Equals(DestinyPresentationNodeChildrenBlock input) { if (input == null) { return(false); } return (( PresentationNodes == input.PresentationNodes || (PresentationNodes != null && PresentationNodes.SequenceEqual(input.PresentationNodes)) ) && ( Collectibles == input.Collectibles || (Collectibles != null && Collectibles.SequenceEqual(input.Collectibles)) ) && ( Records == input.Records || (Records != null && Records.SequenceEqual(input.Records)) ) && ( Metrics == input.Metrics || (Metrics != null && Metrics.SequenceEqual(input.Metrics)) )); }
public bool DeepEquals(DestinyCollectiblesComponent?other) { return(other is not null && Collectibles.DeepEqualsDictionary(other.Collectibles) && CollectionCategoriesRootNodeHash == other.CollectionCategoriesRootNodeHash && CollectionBadgesRootNodeHash == other.CollectionBadgesRootNodeHash); }
public void Update(DestinyProfileCollectiblesComponent?other) { if (other is null) { return; } if (!RecentCollectibleHashes.DeepEqualsListNaive(other.RecentCollectibleHashes)) { RecentCollectibleHashes = other.RecentCollectibleHashes; OnPropertyChanged(nameof(RecentCollectibleHashes)); } if (!NewnessFlaggedCollectibleHashes.DeepEqualsListNaive(other.NewnessFlaggedCollectibleHashes)) { NewnessFlaggedCollectibleHashes = other.NewnessFlaggedCollectibleHashes; OnPropertyChanged(nameof(NewnessFlaggedCollectibleHashes)); } if (!Collectibles.DeepEqualsDictionary(other.Collectibles)) { Collectibles = other.Collectibles; OnPropertyChanged(nameof(Collectibles)); } if (CollectionCategoriesRootNodeHash != other.CollectionCategoriesRootNodeHash) { CollectionCategoriesRootNodeHash = other.CollectionCategoriesRootNodeHash; OnPropertyChanged(nameof(CollectionCategoriesRootNodeHash)); } if (CollectionBadgesRootNodeHash != other.CollectionBadgesRootNodeHash) { CollectionBadgesRootNodeHash = other.CollectionBadgesRootNodeHash; OnPropertyChanged(nameof(CollectionBadgesRootNodeHash)); } }
public void Update(DestinyPresentationNodeChildrenBlock?other) { if (other is null) { return; } if (!PresentationNodes.DeepEqualsList(other.PresentationNodes)) { PresentationNodes = other.PresentationNodes; OnPropertyChanged(nameof(PresentationNodes)); } if (!Collectibles.DeepEqualsList(other.Collectibles)) { Collectibles = other.Collectibles; OnPropertyChanged(nameof(Collectibles)); } if (!Records.DeepEqualsList(other.Records)) { Records = other.Records; OnPropertyChanged(nameof(Records)); } if (!Metrics.DeepEqualsList(other.Metrics)) { Metrics = other.Metrics; OnPropertyChanged(nameof(Metrics)); } }
public bool Equals(DestinyProfileCollectiblesComponent input) { if (input == null) { return(false); } return (( RecentCollectibleHashes == input.RecentCollectibleHashes || (RecentCollectibleHashes != null && RecentCollectibleHashes.SequenceEqual(input.RecentCollectibleHashes)) ) && ( NewnessFlaggedCollectibleHashes == input.NewnessFlaggedCollectibleHashes || (NewnessFlaggedCollectibleHashes != null && NewnessFlaggedCollectibleHashes.SequenceEqual(input.NewnessFlaggedCollectibleHashes)) ) && ( Collectibles == input.Collectibles || (Collectibles != null && Collectibles.SequenceEqual(input.Collectibles)) ) && ( CollectionCategoriesRootNodeHash == input.CollectionCategoriesRootNodeHash || (CollectionCategoriesRootNodeHash.Equals(input.CollectionCategoriesRootNodeHash)) ) && ( CollectionBadgesRootNodeHash == input.CollectionBadgesRootNodeHash || (CollectionBadgesRootNodeHash.Equals(input.CollectionBadgesRootNodeHash)) )); }
public bool DeepEquals(DestinyPresentationNodeChildrenBlock?other) { return(other is not null && PresentationNodes.DeepEqualsList(other.PresentationNodes) && Collectibles.DeepEqualsList(other.Collectibles) && Records.DeepEqualsList(other.Records) && Metrics.DeepEqualsList(other.Metrics)); }
public bool DeepEquals(PresentationChildNode other) { return(other != null && Collectibles.DeepEqualsReadOnlyCollections(other.Collectibles) && Metrics.DeepEqualsReadOnlyCollections(other.Metrics) && PresentationNodes.DeepEqualsReadOnlyCollections(other.PresentationNodes) && Records.DeepEqualsReadOnlyCollections(other.Records)); }
public bool DeepEquals(DestinyProfileCollectiblesComponent?other) { return(other is not null && RecentCollectibleHashes.DeepEqualsListNaive(other.RecentCollectibleHashes) && NewnessFlaggedCollectibleHashes.DeepEqualsListNaive(other.NewnessFlaggedCollectibleHashes) && Collectibles.DeepEqualsDictionary(other.Collectibles) && CollectionCategoriesRootNodeHash == other.CollectionCategoriesRootNodeHash && CollectionBadgesRootNodeHash == other.CollectionBadgesRootNodeHash); }
private void TryToPickUpObj(Collectibles objLookedAt) { if (maxWeight - (CurrentWeight + objLookedAt.Weight) < 0) { Debug.LogWarning("REFUSE PICKUP NOT IMPLEMENTED ?"); } else { anim.SetTrigger("Grab"); objLookedAt.PickUp(); } OnPickUpObject.Invoke(); }
void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Collectible")) { Collectibles collectible = other.gameObject.GetComponent <Collectibles>(); score = score + collectible.point; Destroy(other.gameObject); scoreText.text = "Score: " + score.ToString(); Debug.Log("Current score: " + score); } }
IEnumerator SpawnCollectibles() { while (true) { // Define next spawning position Vector3 nextPos = new Vector3(transform.position.x, transform.position.y + Random.Range(-verticalVariations, verticalVariations), transform.position.z); // Instantiate Collectible Collectibles collectibleTemp = Instantiate(collectibles[Random.Range(0, collectibles.Length)], nextPos, Quaternion.identity, transform); collectibleTemp.GetComponent <Rigidbody>().velocity = -Vector3.right * spawnMoveSpeed; // Calculate next spawning time float timeNextSpawn = spawnTimeCollectibles + Random.Range(-spawnTimeCollectibles * RandomSpawnTimeFactor, spawnTimeCollectibles * RandomSpawnTimeFactor); yield return(new WaitForSeconds(timeNextSpawn)); } }
public void Update(DestinyCollectibleNodeDetailResponse?other) { if (other is null) { return; } if (!Collectibles.DeepEquals(other.Collectibles)) { Collectibles.Update(other.Collectibles); OnPropertyChanged(nameof(Collectibles)); } if (!CollectibleItemComponents.DeepEquals(other.CollectibleItemComponents)) { CollectibleItemComponents.Update(other.CollectibleItemComponents); OnPropertyChanged(nameof(CollectibleItemComponents)); } }
public bool Equals(DestinyCollectibleNodeDetailResponse input) { if (input == null) { return(false); } return (( Collectibles == input.Collectibles || (Collectibles != null && Collectibles.Equals(input.Collectibles)) ) && ( CollectibleItemComponents == input.CollectibleItemComponents || (CollectibleItemComponents != null && CollectibleItemComponents.Equals(input.CollectibleItemComponents)) )); }
public bool DeepEquals(DestinyCharacterResponse?other) { return(other is not null && (Inventory is not null ? Inventory.DeepEquals(other.Inventory) : other.Inventory is null) && (Character is not null ? Character.DeepEquals(other.Character) : other.Character is null) && (Progressions is not null ? Progressions.DeepEquals(other.Progressions) : other.Progressions is null) && (RenderData is not null ? RenderData.DeepEquals(other.RenderData) : other.RenderData is null) && (Activities is not null ? Activities.DeepEquals(other.Activities) : other.Activities is null) && (Equipment is not null ? Equipment.DeepEquals(other.Equipment) : other.Equipment is null) && (Kiosks is not null ? Kiosks.DeepEquals(other.Kiosks) : other.Kiosks is null) && (PlugSets is not null ? PlugSets.DeepEquals(other.PlugSets) : other.PlugSets is null) && (PresentationNodes is not null ? PresentationNodes.DeepEquals(other.PresentationNodes) : other.PresentationNodes is null) && (Records is not null ? Records.DeepEquals(other.Records) : other.Records is null) && (Collectibles is not null ? Collectibles.DeepEquals(other.Collectibles) : other.Collectibles is null) && (ItemComponents is not null ? ItemComponents.DeepEquals(other.ItemComponents) : other.ItemComponents is null) && (UninstancedItemComponents is not null ? UninstancedItemComponents.DeepEquals(other.UninstancedItemComponents) : other.UninstancedItemComponents is null) && (CurrencyLookups is not null ? CurrencyLookups.DeepEquals(other.CurrencyLookups) : other.CurrencyLookups is null)); }
// Detect type of object on Collision private void OnTriggerEnter(Collider other) { if (GameSystem.gameState == GameStates.Playing) { Collectibles collectible = other.GetComponent <Collectibles>(); IKill killableObject = other.GetComponent <IKill>(); if (collectible != null) { GameSystem.instance.CollectCoins(collectible.value); collectible.Interactions(); } if (killableObject != null) { killableObject.Kill(); GameSystem.instance.EndGame(); } } }
public bool Equals(DestinyCollectiblesComponent input) { if (input == null) { return(false); } return (( Collectibles == input.Collectibles || (Collectibles != null && Collectibles.SequenceEqual(input.Collectibles)) ) && ( CollectionCategoriesRootNodeHash == input.CollectionCategoriesRootNodeHash || (CollectionCategoriesRootNodeHash.Equals(input.CollectionCategoriesRootNodeHash)) ) && ( CollectionBadgesRootNodeHash == input.CollectionBadgesRootNodeHash || (CollectionBadgesRootNodeHash.Equals(input.CollectionBadgesRootNodeHash)) )); }
void OnTriggerEnter(Collider col) { if (col.transform.gameObject.tag == "Player") { player = col.transform.gameObject; collectible = player.GetComponent <Collectibles>(); win_UI[0].GetComponent <Text>().text = ("Enemies Eliminated: " + collectible.enemies_killed); win_UI[1].GetComponent <Image>().color = collectible.collectible_icons[0].color; win_UI[2].GetComponent <Image>().color = collectible.collectible_icons[1].color; win_UI[3].GetComponent <Image>().color = collectible.collectible_icons[2].color; win_UI[4].GetComponent <Image>().color = collectible.collectible_icons[3].color; isgunactive = collectible.gunactive; if (collectible.collectible_number == 4) { allcollectibles = true; } Win(); } }
public void TappedCollectible(GameObject collectibleGameObject, Collectibles type) { DestroyTile(collectibleGameObject); switch (type) { case Collectibles.Coin: coinsScore++; GetComponent <AudioSource>().PlayOneShot(CoinSound); break; case Collectibles.Gemstone: gemstonesScore++; GetComponent <AudioSource>().PlayOneShot(GemSound); break; default: break; } UpdateScores(); }
public void Update(DestinyCollectiblesComponent?other) { if (other is null) { return; } if (!Collectibles.DeepEqualsDictionary(other.Collectibles)) { Collectibles = other.Collectibles; OnPropertyChanged(nameof(Collectibles)); } if (CollectionCategoriesRootNodeHash != other.CollectionCategoriesRootNodeHash) { CollectionCategoriesRootNodeHash = other.CollectionCategoriesRootNodeHash; OnPropertyChanged(nameof(CollectionCategoriesRootNodeHash)); } if (CollectionBadgesRootNodeHash != other.CollectionBadgesRootNodeHash) { CollectionBadgesRootNodeHash = other.CollectionBadgesRootNodeHash; OnPropertyChanged(nameof(CollectionBadgesRootNodeHash)); } }
public void setIngredients(List <float> _percentages, Collectibles[] _ingredientTypes) { // remplissage des pourcentages manquant a 0.0f pourcentages = _percentages; ingredientsType = _ingredientTypes; // recuperation des positions de spawn dans la part de pizza GetSpawnPositions(); // calcul du nombre d'ingredient a spawnes de chaque type IngredientsInventory(); // instantiation des ingredients for (int i = 0; i < ingredientsType.Length; ++i) { for (int j = 0; j < numIngredients[i]; ++j) { Collectibles currentObject = Instantiate(ingredientsType[i], transform); ingredientSpawned.Add(currentObject); } } List <GameObject> spawnCopy = spawnPoints; // attribution des positions for (int i = 0; i < ingredientSpawned.Count; ++i) { int idx = Random.Range(0, spawnCopy.Count - 1); ingredientSpawned[i].transform.position = spawnCopy[idx].transform.position; ingredientSpawned[i].transform.parent = pizzaPart.transform; ingredientSpawned[i].transform.localScale = new Vector3(3.0f, 3.0f, 3.0f); //print( i + " : " + ingredientSpawned[i].transform.localScale.x + " " + ingredientSpawned[i].transform.localScale.y + " " + ingredientSpawned[i].transform.localScale.z); spawnCopy.RemoveAt(idx); } }
virtual public void AddCollectible(Collectible collectible) { Collectibles.Add(collectible); }
void Start() { coll = GetComponent <Collectibles>(); }
void Start() { instace = this; AS = GetComponent <AudioSource>(); }
void Update() { eyePosition = pointOfView.transform.position + pointOfView.transform.forward * 0.4f; lookTowards = pointOfView.transform.forward; colRay = Color.red; theinput = Input.inputString; fire1 = Input.GetButtonDown("Fire1"); fire2 = Input.GetButtonDown("Fire2"); fire3 = Input.GetButtonDown("Fire3"); if (Physics.Raycast(eyePosition, lookTowards, out hit, lookDistance)) { theTag = hit.collider.tag; switch (theTag) { case "Collectibles": Collectibles objLookedAt = hit.collider.gameObject.GetComponent <Collectibles>(); colRay = Color.green; if (objLookedAt.canBePickedUp) { objLookedAt.StartGlowing(maxWeight - (CurrentWeight + objLookedAt.Weight) >= 0); if (fire1) { TryToPickUpObj(objLookedAt); } camTarget = objLookedAt; } break; case "SpaceShip": if (fire1) { TryToPlaceObj(hit.collider.GetComponent <SpaceShipAssembly>()); } break; case "Bin": if (fire1) { ThrowAwayAllIngredient(); } break; case "AxeCentral": if (fire1 && mozzaNbr > 0) { //slow pillar Debug.Log("slowed pillar"); pizza.StopTurning(); mozzaNbr--; ui.UpdateValues(); } break; default: break; } } else if (camTarget != null) { camTarget.StopGlowing(); camTarget = null; } if (fire2) { StartCoroutine(ShootMissile()); } if (fire3 && pepprNbr > 0) { GetComponent <UnityStandardAssets.Characters.FirstPerson.FirstPersonController>().MangerLePiment(); pepprNbr--; OnUseObject.Invoke(); } if (transform.position.y < -40) { PlayerFail(); } Debug.DrawRay(eyePosition, lookTowards * lookDistance, colRay); }
public bool DeepEquals(DestinyCollectibleNodeDetailResponse?other) { return(other is not null && (Collectibles is not null ? Collectibles.DeepEquals(other.Collectibles) : other.Collectibles is null) && (CollectibleItemComponents is not null ? CollectibleItemComponents.DeepEquals(other.CollectibleItemComponents) : other.CollectibleItemComponents is null)); }
public void AddCollectibleByPosition(Vector2 collectiblePosition) { Collectibles.Add(new Collectible(currentCollectibleID, collectiblePosition)); currentCollectibleID++; }
public void SetItem(Collectibles type, GameObject obj) { Item = new Tuple <Collectibles, GameObject>(type, obj); }
// Start is called before the first frame update void Start() { collectibles = GetComponent <Collectibles>(); spriteRenderer = GetComponent <SpriteRenderer>(); }
public void Update(DestinyCharacterResponse?other) { if (other is null) { return; } if (!Inventory.DeepEquals(other.Inventory)) { Inventory.Update(other.Inventory); OnPropertyChanged(nameof(Inventory)); } if (!Character.DeepEquals(other.Character)) { Character.Update(other.Character); OnPropertyChanged(nameof(Character)); } if (!Progressions.DeepEquals(other.Progressions)) { Progressions.Update(other.Progressions); OnPropertyChanged(nameof(Progressions)); } if (!RenderData.DeepEquals(other.RenderData)) { RenderData.Update(other.RenderData); OnPropertyChanged(nameof(RenderData)); } if (!Activities.DeepEquals(other.Activities)) { Activities.Update(other.Activities); OnPropertyChanged(nameof(Activities)); } if (!Equipment.DeepEquals(other.Equipment)) { Equipment.Update(other.Equipment); OnPropertyChanged(nameof(Equipment)); } if (!Kiosks.DeepEquals(other.Kiosks)) { Kiosks.Update(other.Kiosks); OnPropertyChanged(nameof(Kiosks)); } if (!PlugSets.DeepEquals(other.PlugSets)) { PlugSets.Update(other.PlugSets); OnPropertyChanged(nameof(PlugSets)); } if (!PresentationNodes.DeepEquals(other.PresentationNodes)) { PresentationNodes.Update(other.PresentationNodes); OnPropertyChanged(nameof(PresentationNodes)); } if (!Records.DeepEquals(other.Records)) { Records.Update(other.Records); OnPropertyChanged(nameof(Records)); } if (!Collectibles.DeepEquals(other.Collectibles)) { Collectibles.Update(other.Collectibles); OnPropertyChanged(nameof(Collectibles)); } if (!ItemComponents.DeepEquals(other.ItemComponents)) { ItemComponents.Update(other.ItemComponents); OnPropertyChanged(nameof(ItemComponents)); } if (!UninstancedItemComponents.DeepEquals(other.UninstancedItemComponents)) { UninstancedItemComponents.Update(other.UninstancedItemComponents); OnPropertyChanged(nameof(UninstancedItemComponents)); } if (!CurrencyLookups.DeepEquals(other.CurrencyLookups)) { CurrencyLookups.Update(other.CurrencyLookups); OnPropertyChanged(nameof(CurrencyLookups)); } }
public bool Equals(DestinyCharacterResponse input) { if (input == null) { return(false); } return (( Inventory == input.Inventory || (Inventory != null && Inventory.Equals(input.Inventory)) ) && ( Character == input.Character || (Character != null && Character.Equals(input.Character)) ) && ( Progressions == input.Progressions || (Progressions != null && Progressions.Equals(input.Progressions)) ) && ( RenderData == input.RenderData || (RenderData != null && RenderData.Equals(input.RenderData)) ) && ( Activities == input.Activities || (Activities != null && Activities.Equals(input.Activities)) ) && ( Equipment == input.Equipment || (Equipment != null && Equipment.Equals(input.Equipment)) ) && ( Kiosks == input.Kiosks || (Kiosks != null && Kiosks.Equals(input.Kiosks)) ) && ( PlugSets == input.PlugSets || (PlugSets != null && PlugSets.Equals(input.PlugSets)) ) && ( PresentationNodes == input.PresentationNodes || (PresentationNodes != null && PresentationNodes.Equals(input.PresentationNodes)) ) && ( Records == input.Records || (Records != null && Records.Equals(input.Records)) ) && ( Collectibles == input.Collectibles || (Collectibles != null && Collectibles.Equals(input.Collectibles)) ) && ( ItemComponents == input.ItemComponents || (ItemComponents != null && ItemComponents.Equals(input.ItemComponents)) ) && ( UninstancedItemComponents == input.UninstancedItemComponents || (UninstancedItemComponents != null && UninstancedItemComponents.Equals(input.UninstancedItemComponents)) ) && ( CurrencyLookups == input.CurrencyLookups || (CurrencyLookups != null && CurrencyLookups.Equals(input.CurrencyLookups)) )); }