Esempio n. 1
0
    public void GenerateFocus()
    {
        //this is here to prevent a null reference exception in the editor
        if (EntityFactory.Instance != null)
        {
            focus = EntityFactory.Instance.Create <Focus>();
            focus.AnimateWhenTimeFrozen = AnimateFocusWhenTimeFrozen;
            focus.gameObject.SetActive(true);

            focus.transform.position = (Vector2)transform.TransformPoint(spawnPoint * door.Size);

            focus.Impact(launchData);

            focus.OnEnterStateEvent.AddListener(OnFocusStateChange);
        }
    }