示例#1
0
    void SetTags()
    {
        MeleePoint meleePoint = player.GetComponentInChildren <MeleePoint>();

        player.tag           = "Player";
        meleePoint.targetTag = "Enemy";
    }
示例#2
0
    void Awake()
    {
        shootManager = gameObject.AddComponent <ShootManager>();
        selfStats    = GetComponentInParent <CharacterStats>();
        inventory    = GetComponentInParent <Inventory>();
        equipment    = GetComponentInParent <Equipment>();
        meleePoint   = GetComponentInChildren <MeleePoint>();
        shootManager.setParameters(characterGFX, firePoint, equipment);

        equipment.onWeaponChanged += UpdateWeapon;
        UpdateWeapon(equipment.weapon);
    }