Ejemplo n.º 1
0
 void Awake()
 {
     m_lineRenderer = GetComponent <LineRenderer>();
     m_catHead      = FindObjectOfType <CatHead>();
     if (m_catHead == null)
     {
         throw new UnityException("Missing cat head object");
     }
 }
Ejemplo n.º 2
0
 void Update()
 {
     if (m_controllerIndex != -1 && m_explodable != null && SteamVR_Controller.Input(m_controllerIndex).GetPressDown(EVRButtonId.k_EButton_SteamVR_Trigger))
     {
         CatHead catHead = FindObjectOfType <CatHead>();
         catHead.Attack(m_explodable);
         m_explodable = null;
     }
 }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        CatRenderer = CatHead.GetComponent <Renderer>();

        catSE = GetComponent <AudioSource>();

        MouseObj = GameObject.Find("Rat");
        mouse    = MouseObj.GetComponent <MouseController>();
        MouseObj.GetComponent <MouseController>();
        CatAni  = CatObject.GetComponent <Animator>();
        BoxColl = gameObject.GetComponent <BoxCollider>();
        WatchLighting.enabled = false;
    }
Ejemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        CatRenderer = CatHead.GetComponent <Renderer>();

        MouseObj = GameObject.Find("Rat");
        mouse    = MouseObj.GetComponent <MouseController>();

        CatAni  = CatObject.GetComponent <Animator>();
        BoxColl = gameObject.GetComponent <BoxCollider> ();
        WatchLighting.enabled = false;
        catSE = GetComponent <AudioSource>();
        mouse = MouseObj.GetComponent <MouseController>();

        //  CatRenderer.material.mainTexture = Resources.Load("CAT1_BODY 02") as Texture;
    }