Esempio n. 1
0
 public void DecreaseSource()
 {
     hejhej          = GameObject.FindObjectOfType(typeof(SetTargetedSource)) as SetTargetedSource;
     m_objectToAlter = hejhej.GetGameObject();
     m_objectToAlter.GetComponent <UpdatePotentialFields>().AlterCharge(10);
     //hejhej2.AlterCharge(10);
 }
Esempio n. 2
0
 // Update is called once per frame
 public void Erase()
 {
     //RaycastHit hit;
     //Ray ray = Camera.main.ScreenPointToRay(gameObject.transform.position);// kan va fel gameobjectposition
     //if (Physics.Raycast(ray, out hit))
     //{
     //    if (hit.transform != gameObject.transform)
     //    {
     //        if (hit.collider.gameObject.tag != "Respawn")
     //        {
     //            Destroy(hit.collider.gameObject);
     //        }
     //    }
     //}
     hejhej          = GameObject.FindObjectOfType(typeof(SetTargetedSource)) as SetTargetedSource;
     m_objectToAlter = hejhej.GetGameObject();
     Destroy(m_objectToAlter);
 }