Пример #1
0
	// Update is called once per frame
	void Update () {
		if(m_target == null ||m_start == null) return;
		
		if(m_MeshEffect == null)
		{
			m_MeshEffect = gameObject.GetComponent<AsMeshEffect>();
			
		}
	
		
		transform.parent = null;
		transform.position = m_start.position;		
		transform.rotation =  Quaternion.identity;
		
		float fDist = 	Vector3.Distance (m_target.position, transform.position);
	
		if(m_MeshEffect.m_Play)
			SetPlanVertex(fDist);
		
		
		gameObject.transform.LookAt(m_target.position);
	
	}
Пример #2
0
	// Use this for initialization
	void Start () {
	
		m_MeshEffect = gameObject.GetComponent<AsMeshEffect>();
	
	}