Advertisement
Guest User

trigger prog smu

a guest
May 25th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.88 KB | None | 0 0
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. using UnityEngine.EventSystems;
  6.  
  7. public class trigger : EventTrigger
  8. {
  9.     [SerializeField]
  10.     Material c1;
  11.     GameObject c;
  12.  
  13.     public bool entra= false;
  14.  
  15.  
  16.     void Update()
  17.     {
  18.         if (entra)    // this is the same as saying "if (rotateObject == true)"
  19.         {
  20.             print("entraaa");
  21.             c.transform.localScale += Vector3(10,10,10);
  22.         }
  23.         else
  24.         {
  25.             print("esce");
  26.         }
  27.     }
  28.  
  29.     private Vector3 Vector3(double v1, int v2, int v3)
  30.     {
  31.         throw new NotImplementedException();
  32.     }
  33.  
  34.     public override void OnPointerEnter(PointerEventData eventData){
  35.         entra = true;
  36.        
  37.     }
  38.  
  39.     public override void OnPointerExit(PointerEventData eventData)
  40.     {
  41.  
  42.         entra = false;
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement