public Vector3 newPosition; //New position of the rocks void Awake() { //If an PuzzleAzteca exists and it is not this... if (Instance != null && Instance != this) { Debug.LogError("Error with PuzzleAzteca script components, 2 instances " + this); //...destroy this and exit. There can be only one PuzzleAzteca Destroy(gameObject); return; } //This is the Instance PuzzleAzteca and it should persist Instance = this; }
public bool startMove = false; //If can move the image or not /// <summary> /// Start is called on the frame when a script is enabled just before /// any of the Update methods is called the first time. /// </summary> void Start() { GameObject pA = GameObject.Find("PuzzleAzteca"); puzzAzt = pA.GetComponent <PuzzleAzteca>(); }