Exemplo n.º 1
0
Arquivo: Ken.cs Projeto: Kimsy99/c-19
 void Awake()
 {
     spriteFlippable2D = GetComponent <SpriteFlippable2D>();
     flashable         = GetComponent <Flashable>();
     health            = GetComponent <KenHealth>();
     movement          = GetComponent <KenMovement>();
     shooting          = GetComponent <KenShooting>();
 }
Exemplo n.º 2
0
Arquivo: NPC.cs Projeto: 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>();
    }