void Awake() { m_lineRenderer = GetComponent <LineRenderer>(); m_catHead = FindObjectOfType <CatHead>(); if (m_catHead == null) { throw new UnityException("Missing cat head object"); } }
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; } }
// 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; }
// 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; }