using System.Collections; using System.Collections.Generic; using UnityEngine; using…
- User
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI;
public class SelectTypeMode : MonoBehaviour { public GameObject murdererPrefab; public GameObject survivorPrefab; public Dropdown characterSelector;
private bool isPlayingAsMurderer = false; public void SelectCharacter() { int characterIndex = characterSelector.value; if (characterIndex == 0) { isPlayingAsMurderer = false; } else if (characterIndex == 1) { isPlayingAsMurderer = true; } } public void SkipItemCollection() { if (isPlayingAsMurderer) { // Add logic here to skip item collection for the Murderer character } else { // Add logic here to collect items for the Survivor character } }}
i nneed new scriptt for rigidbod force anims
i mean my characterr have animatorr
its have animation public string Walking inside aniamtorr
and Idle
i need play fixed time 0.8 aniamtion based on rigidbod of characterr if force near 0.1 or near then its must be idle fixed aniamtion play
u know
- Assistant
- User
i dont have transitions at all in aniamtions, its just dropped clips Walking and idle
does it wil works?
- Assistant
- User
there is no smoothness at all also clips stuck on 1 frame, no looping playing at all
rewritee fully update() there is no transition like
PlayFixedTimee
tehre is some void to play animator smoothly transfition like Aniamtorr PlayFixed()
- Assistant
- User
i usingg tmrpoo text how make colros eanothe color like orange and white with <color= 1290192> orange text
whats i ned paste to text filed ?
- Assistant
To use TMP (Text Mesh Pro) rich text tags to change the color of specific text segments, you can use the tag in your text strings. You can specify colors using hexadecimal color codes.
- User
how change also monoscpae and size make little smalle of 1 word that original also with <> things
i need very short answerr, only text field string, no more
- Assistant
Certainly! Here's the combined rich text string that changes the color to orange, makes the text monospaced, and adjusts the size of a single word:
<color=#FFA500><mspace=0.8em><size=80%>orange text</size></mspace></color>This will:
- Change the color to orange.
- Make the text monospaced.
- Reduce the font size to 80% of the original size.
Simply paste this string into your TMP_Text field to see the effect.
- User
i ahve that coroutinee, how stop it?
private IEnumerator SpawnSpecialItems() { while (true) { int randomIndex = Random.Range(0, specialItemSpawnPoints.Count); GameObject item= Instantiate(specialItemPrefab, specialItemSpawnPoints[randomIndex].position, Quaternion.identity); specialItems.Add(item); yield return new WaitForSeconds(Random.Range(13f, 13f)); } } - Assistant
To stop a coroutine in Unity, you can use
StopCoroutinemethod. This requires that you store a reference to the coroutine when you start it. Here's how you can modify your code to include stopping the coroutine:Starting the Coroutine and Storing Its Reference
private Coroutine spawnCoroutine; void Start() { spawnCoroutine = StartCoroutine(SpawnSpecialItems()); }Stopping the Coroutine
- User
- Assistant
- User
how can i make all its be in 1 scriptt?
i wanna for example SaveLoadManager calss be on up of scriptt, i mean in near public class FunnyHorrore : MonoBehaviour
or smialr
how correct paste it to also get access very easly directly?
also i need short asnwerr
- Assistant