void Awake() { if (!ExplosionPool) { ExplosionPool = FindObjectOfType <ExplosionPool>(); } Teleportable = GetComponent <TeleportableEntity>(); OnAwake(); }
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; }