Beispiel #1
0
    public void SpawnDescent(Vector3 orePosition)
    {
        Debug.Log("Spawn descent");

        DestroyOres(orePosition);

        descent = Instantiate(descentPrefab,
                              orePosition,
                              Quaternion.identity);

        _gridBehavior.SetDescentPos(orePosition);

        descentWasSpawned = true;
        PointerController.EnablePointer(descent.transform.position);
    }
Beispiel #2
0
    public void LoadDescent(DescentData data)
    {
        if (data == null)
        {
            return;
        }

        if (!data.descentWasSpawned)
        {
            return;
        }

        Debug.Log("spawn descent");

        descent = Instantiate(descentPrefab,
                              new Vector3(data.position[0],
                                          data.position[1],
                                          data.position[2]),
                              Quaternion.identity);

        descentWasSpawned = true;

        PointerController.EnablePointer(descent.transform.position);
    }