private void Awake() { charMovement = GetComponent <CharMovement>(); meleeCombat = GetComponent <MeleeCombat>(); rangedCombat = GetComponent <RangedCombat>(); rangedCombatGhost = GetComponent <RangedCombatGhost>(); aimWeapon = GetComponent <AimWeapon>(); throwWeapon = GetComponent <ThrowWeapon>(); playerCollider = GetComponent <CapsuleCollider>(); anim = GetComponent <Animator>(); }
private void Start() { code = GameObject.Find("gameManager").GetComponent <GameManager>(); player = GameObject.FindGameObjectWithTag("Player").transform; anim = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); Patrolling(); isAlive = true; layerMask = ~layerMask; count = 1; Physics2D.IgnoreCollision(this.GetComponent <BoxCollider2D>(), this.GetComponent <BoxCollider2D>(), true); tw = GetComponent <ThrowWeapon>(); isAttack = false; eh = GetComponent <EnemyHealth>(); }
private void Start() { meleeCombat = GetComponent <MeleeCombat>(); rangedCombat = GetComponent <RangedCombat>(); aimWeapon = GetComponent <AimWeapon>(); throwWeapon = GetComponent <ThrowWeapon>(); rangedCombatGhost = GetComponent <RangedCombatGhost>(); meleeCombat.enabled = false; rangedCombat.enabled = false; aimWeapon.enabled = false; throwWeapon.enabled = false; rangedCombatGhost.enabled = false; kusarigama.SetActive(false); kusarigamaGhost.SetActive(false); GetWeaponState(); }
// Start is called before the first frame update void Start() { move = GetComponent <PlayerMovement>(); material = GetComponent <Renderer>().material; weaponRb2D = weapon.GetComponent <Rigidbody2D>(); throwWeaponScript = weapon.GetComponent <ThrowWeapon>(); pAnimScript = GetComponent <PlayerAnimationScript>(); throwWeaponScript.AddThrowWeaponScript(this); coll = GetComponent <Collision>(); origLockPos = weapon.localPosition; origLockRot = weapon.localEulerAngles; arrowOrigPosition = arrow.localPosition; if (arrow.gameObject.activeInHierarchy) { arrow.gameObject.SetActive(false); } ChangeState(State.Idle); }
void Start() { throwWeapon = FindObjectOfType <ThrowWeapon>(); state = GrappleState.NONE; }