public override void Action() { if (!CanInteract) { return; } if (currentStep < points.Length - 1) { Invoke("ActivateCanInteract", 1); CanInteract = false; currentStep++; Vector3 pos = points[currentStep].position; SituationInfoUI.Instance.SetNextStep(nameStep, currentStep); ManagerInteractItems.Instance.ShowPointMove(pos, currentStep); CanvasText.SetActive(true); CanvasText.transform.position = pos; CanvasText.transform.LookAt(Camera.main.transform); } else { CanInteract = false; ManagerInteractItems.Instance.PointMove.gameObject.SetActive(false); CanvasText.SetActive(false); TrainingStateManager.Instance.SetEndSituation(); } }
private void OnEnable() { canHandRotate = false; // rotateRood.Play("RoodStart"); if (CanvasText != null) { CanvasText.SetActive(true); } if (spriteAlert != null) { spriteAlert.SetActive(true); } if (mapIdent != null) { mapIdent.SetActive(true); } if (ParticleOil != null) { var emission = ParticleOil.emission; var rate = emission.rateOverTime; rate.constant = emmisionOilSpill; emission.rateOverTime = rate; } }