void OnTriggerEnter(Collider other) { if (active) { act.activate(); } }
// Update is called once per frame void Update() { if (grabTentacle.grab && Input.GetAxisRaw("Jump") > 0) { grabTentacle.grab.transform.position = HeadTentacle.transform.position; } if (grabTentacle.activable && Input.GetAxisRaw("Jump") > 0 && resetActive) { Activable activeObject = grabTentacle.activable.GetComponent <Activable>(); Debug.Log(activeObject); if (activeObject) { activeObject.activate(); } resetActive = false; } if (Input.GetAxisRaw("Jump") == 0) { resetActive = true; } }
void ApplyActivate(Activable control) { control.activate(); }