// Update is called once per frame
 void Update()
 {
     /*
     if (rigidbody2D != null){
         transform.localScale = new Vector2 (1 * transform.parent.localScale.x, 1);
     }
     */
     alpha -= 0.01f;
     this.GetComponent<SpriteRenderer> ().color = new Color(r,g,b,alpha);
     if (alpha <= 0) {
         npc_acpt = GetComponentInParent<ComunicationAndStatusNPC>();
         if (npc_acpt != null){
             npc_acpt.acptin = false;
         }
         Destroy(this.gameObject);
     }
 }
 // Use this for initialization
 void Start()
 {
     npc_acpt = GameObject.FindGameObjectWithTag("NPC").GetComponent<ComunicationAndStatusNPC>();
 }
Beispiel #3
0
 // Use this for initialization
 void Start()
 {
     anim = GetComponent<Animator> ();
     npc_dial = GetComponent<ComunicationAndStatusNPC>();
 }