public void PlayerStompOnTrigger() { if (chosenTrapType == TrapType.fallingNet) { createdNet = (Transform)Instantiate(netPrefab, new Vector2(player.position.x + xCreationOffset, transform.position.y + yCreationOffset), Quaternion.Euler(new Vector2(0.0f, 0.0f))); player.GetComponent <DisableEnableMovement>().disableMovement(); quickTimeEventHandler = GameObject.FindWithTag("QuickTimeEvent").GetComponent <QuickTimeEvent>(); StartCoroutine(StartQTEAfterTime(2.0f)); } }
// Use this for initialization void Start() { randomizeOccurance(); chooseEnemy(); if (isLurking) { chosenEnemy = (GameObject)Instantiate(chosenPrefab, GetComponent <Transform>().position, Quaternion.Euler(0.0f, 0.0f, 0.0f)); chosenEnemy.GetComponent <Knight>().body[8].GetComponent <WeaponCollisionWithPlayer>().SetLurkingEnemyComponent(this); SetEnemyHidden(); quickTimeEventHandler = GameObject.FindWithTag("QuickTimeEvent").GetComponent <QuickTimeEvent>(); } else { this.enabled = false; } }
private void Start() { _qte = GetComponent <QuickTimeEvent>(); }