예제 #1
0
파일: Ken.cs 프로젝트: Kimsy99/c-19
 void Awake()
 {
     spriteFlippable2D = GetComponent <SpriteFlippable2D>();
     flashable         = GetComponent <Flashable>();
     health            = GetComponent <KenHealth>();
     movement          = GetComponent <KenMovement>();
     shooting          = GetComponent <KenShooting>();
 }
예제 #2
0
파일: NPC.cs 프로젝트: Kimsy99/c-19
    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>();
    }