void Awake() { spriteFlippable2D = GetComponent <SpriteFlippable2D>(); flashable = GetComponent <Flashable>(); health = GetComponent <KenHealth>(); movement = GetComponent <KenMovement>(); shooting = GetComponent <KenShooting>(); }
void Awake() { spriteFlippable2D = GetComponent <SpriteFlippable2D>(); flashable = GetComponent <Flashable>(); health = GetComponent <NPCHealth>(); movement = GetComponent <NPCMovement>(); Transform weaponHolderTransform = transform.Find("WeaponHolder"); if (weaponHolderTransform != null) { weaponHolder = weaponHolderTransform.gameObject; } heldWeapon = GetComponentInChildren <NPCHeldWeapon>(); }