Ejemplo n.º 1
0
        public void Start()
        {
            _visibilities = GetComponentsInChildren <Visibility>();
            _mainPlayer   = GameObjectEx.FindGameObjectWithTag(GameObjectTags.Player).transform;
            var shadowLayer = Layers.GetLayer(LayerName.ShadowLayer);

            _layerMask = (1 << shadowLayer) | (1 << Layers.GetLayer(LayerName.Player));
        }
Ejemplo n.º 2
0
    public void Awake()
    {
        _dynamicGameObjects      = GameObjectEx.Find(GameObjectNames.DynamicObjects);
        _playerGameObject        = GameObjectEx.FindGameObjectWithTag(GameObjectTags.Player);
        _toMoveDirectionRotation = GetComponent <ToMoveDirectionRotation>();
        _toTargetObjectRotation  = GetComponent <ToTargetObjectRotation>();

        var shadowLayer = Layers.GetLayer(LayerName.ShadowLayer);

        _layerMask     = (1 << shadowLayer) | (1 << Layers.GetLayer(LayerName.Player));
        _moveScript    = GetComponent <MoveScript>();
        _weaponManager = GetComponentInChildren <WeaponManager>();

        if (_weaponManager == null)
        {
            Debug.LogError("Weapon manager not found in child objects.");
        }
    }