Esempio n. 1
0
	// Use this for initialization
	void Start () {

		factory = GetComponent<EnemyFactory> ();
		factory.StopCreate ();


		effect = Instantiate(Resources.Load( "Model/Ca" + id.ToString(), typeof(GameObject))) as GameObject;
		if (effect != null) {
			//effect.transform.position = transform.position;
			effect.transform.parent = factory.effectPoint.transform;
			effect.transform.localPosition = Vector3.zero;
			effect.transform.localRotation = Quaternion.Euler(Vector3.zero);
			effect.SetActive(false);
			parentControl.SetSealEffect(effect);
		}

		for(int i = 0 ; i < parentControl.transform.GetChild(0).childCount ; ++i)
		{
			GameObject obj = parentControl.transform.GetChild(0).GetChild(i).gameObject;
			if(obj.name.Contains("frag"))
			{
				fragObject.Add(obj);
			}
		}

		parentControl.PlayAnimator (1);
		
		CameraControl.Me.ShakeCamera (0.05f, duration);
		
		InvokeRepeating ("RandomBombOnChild", 0f , 0.5f);

	}
Esempio n. 2
0
	// Use this for initialization
	void Start ()
	{
	
		factory = GetComponent<EnemyFactory> ();
		factory.StopCreate ();

		effect = Instantiate (Resources.Load ("Model/Stop", typeof(GameObject))) as GameObject;
		if (effect != null) {
			effect.transform.position = transform.position;
			effect.transform.up = (transform.position - PlanetControl.Me.gameObject.transform.position).normalized;
		}

		ClipSound.Me.Play ("ganrao_attack");

		ZhangYuControl.Me.PlayAnimator (ZhangYuControl.Me.skill2);
	}