예제 #1
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        player = GameObject.FindGameObjectWithTag("Player");

        foreach (GameObject Object in GameObject.FindGameObjectsWithTag("Espiritual Object"))
        {
            EspiritualObjects.Add(Object);
            //Object.SetActive(false);
        }

        foreach (Transform child in player.GetComponentsInChildren <Transform>(true))
        {
            if (child.CompareTag("Physical Body"))
            {
                body = child.gameObject;
            }
            else if (child.CompareTag("Spirit Body"))
            {
                spirit = child.gameObject;
            }
        }
    }
예제 #2
0
    void Start()
    {
        if (body == null)
        {
            body = GameObject.FindGameObjectWithTag("Player");
        }
        else if (spirit == null)
        {
            spirit = GameObject.FindGameObjectWithTag("Spirit");
        }

        currentState = body;

        changeStateScript = this.GetComponent <OutOfBodyExperience>();
    }
예제 #3
0
    // Chave e cristal existem tipos (humano ou espirito)
    // Caso o player possua um cristal de tal tipo e encoste em uma chave de mesmo tipo ele trigguera uma ação

    private void Start()
    {
        transition = OutOfBodyExperience.getInstance();
    }