Пример #1
0
    public void SpawnHormone(HormoneData hormoneData)
    {
        Hormone newHormone
            = Instantiate(hormonePrefab, transform)
              .GetComponent <Hormone>();

        newHormone.data = hormoneData;
        StartCoroutine(newHormone.Run(spline, OnAppear, OnSet, OnDisappear, OnRelease));
    }
Пример #2
0
        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);
            });
        }
Пример #3
0
    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;
        }
    }
Пример #4
0
 protected void Emit(Hormone hormone)
 {
     EndocrineSystem.Inject(hormone);
 }
Пример #5
0
 private void SetHormoneTouchTime(Hormone hormone)
 {
     necessaryTouchTime = hormone.data.necessaryTouchTime;
 }
Пример #6
0
 public void SetHormone(Hormone hormone, float moveTime)
 {
     StartCoroutine(ToHormone(hormone.data, moveTime));
 }