예제 #1
0
 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>();
 }
예제 #2
0
 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>();
 }
예제 #3
0
    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();
    }
예제 #4
0
파일: Throw.cs 프로젝트: TaaviM88/HazardMat
    // 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);
    }
예제 #5
0
    void Start()
    {
        throwWeapon = FindObjectOfType <ThrowWeapon>();

        state = GrappleState.NONE;
    }