Пример #1
0
	// Use this for initialization
	void Start () {
		circle = GameObject.FindGameObjectWithTag ("circle").GetComponent<SummoningCircle>();
		activeSprite = gameObject.GetComponent<Image> ().sprite;
		obj = Instantiate (prefab) as GameObject;
		obj.transform.position = new Vector3 (99f, 0f, 0f);
		obj.GetComponent<SpriteRenderer> ().sprite = activeSprite;
		obj.GetComponent<Rune> ().id = name;

	}
Пример #2
0
	// Update is called once per frame
	void Update () {
		circle = GameObject.FindGameObjectWithTag ("circle").GetComponent<SummoningCircle>();
		if (circle == null) {
			return;
		}
		if (GameData.runeUnlock [id] == 1) {
			on = true;
			gameObject.GetComponent<Image> ().sprite = activeSprite;
			gameObject.GetComponent<Button> ().enabled = true;
		} else {
			on = false;
			gameObject.GetComponent<Image> ().sprite = defaultSprite;
			gameObject.GetComponent<Button> ().enabled = false;
		}
	}
Пример #3
0
	void Awake()
	{
		theManager = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GameManager> ();
		theCircle = GameObject.FindGameObjectWithTag ("SummoningCircle").GetComponent<SummoningCircle> ();
	}
Пример #4
0
	// Use this for initialization

	void Awake(){
		instance = this;
	}