public void SpawnHormone(HormoneData hormoneData) { Hormone newHormone = Instantiate(hormonePrefab, transform) .GetComponent <Hormone>(); newHormone.data = hormoneData; StartCoroutine(newHormone.Run(spline, OnAppear, OnSet, OnDisappear, OnRelease)); }
public static void Inject(Hormone hormone) { var availableBindings = Bindings.Keys; var actions = availableBindings .Where(x => hormone.GetType() == x || x.IsAssignableFrom(hormone.GetType()) ) .SelectMany(x => Bindings[x]); Parallel.ForEach(actions, (action, b, d) => { action.Invoke(hormone); }); }
private void OnHormoneSetted(Hormone hormone) { if (!displayedHormones.Contains(hormone.data.id)) { displayedHormones.Add(hormone.data.id); PauseManager.Instance.ShowModal(new Vector3(0, 0, 0), texts.Hormones[hormone.data.id]); } if (displayedHormones.Count >= texts.Hormones.Count()) { PlayerPrefs.SetString( "Tuition_Hormones", JsonUtility.ToJson(displayedHormones)); HormoneSpawner.OnSet -= OnHormoneSetted; } }
protected void Emit(Hormone hormone) { EndocrineSystem.Inject(hormone); }
private void SetHormoneTouchTime(Hormone hormone) { necessaryTouchTime = hormone.data.necessaryTouchTime; }
public void SetHormone(Hormone hormone, float moveTime) { StartCoroutine(ToHormone(hormone.data, moveTime)); }