Exemplo n.º 1
0
    void Awake()
    {
        if (!ExplosionPool)
        {
            ExplosionPool = FindObjectOfType <ExplosionPool>();
        }

        Teleportable = GetComponent <TeleportableEntity>();
        OnAwake();
    }
Exemplo n.º 2
0
    public void CreateDuplicate(Vector3 position)
    {
        if (duplicate != null)
        {
            return;
        }

        var gameObject = GameObject.Instantiate(this.gameObject) as GameObject;
        duplicate = gameObject.GetComponent<TeleportableEntity>();
        duplicate.transform.position = position;
        duplicate.isCopy = true;
    }